当前位置: 首页>>代码示例>>C++>>正文


C++ pod_vector::erase方法代码示例

本文整理汇总了C++中pod_vector::erase方法的典型用法代码示例。如果您正苦于以下问题:C++ pod_vector::erase方法的具体用法?C++ pod_vector::erase怎么用?C++ pod_vector::erase使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pod_vector的用法示例。


在下文中一共展示了pod_vector::erase方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: Erase

	/// Erase all information in an operation sequence player.
	void Erase(void)
	{	
		num_rec_var_       = 0;
		num_rec_vecad_vec_ = 0;

		rec_op_.erase();
		rec_vecad_ind_.erase();
		rec_op_arg_.erase();
		rec_par_.erase();
		rec_text_.erase();
	}
开发者ID:markpayneatwork,项目名称:adcomp,代码行数:12,代码来源:player.hpp

示例2: Erase

	/// Erase all information in an operation sequence player.
	void Erase(void)
	{	
		num_var_rec_       = 0;
		num_load_op_rec_   = 0;
		num_vecad_vec_rec_ = 0;

		op_rec_.erase();
		vecad_ind_rec_.erase();
		op_arg_rec_.erase();
		par_rec_.erase();
		text_rec_.erase();
	}
开发者ID:iagomosqueira,项目名称:FLife,代码行数:13,代码来源:player.hpp

示例3: resize

	/*! Change number of sets, set end, and initialize all sets as empty

	If \c n_set_in is zero, any memory currently allocated for this object 
	is freed. Otherwise, new memory may be allocated for the sets (if needed).

	\param n_set_in
	is the number of sets in this vector of sets.

	\param end_in
	is the maximum element plus one (the minimum element is 0).
	*/
	void resize(size_t n_set_in, size_t end_in) 
	{
		n_set_          = n_set_in;
		end_            = end_in;
		if( n_set_ == 0 )
		{	data_.free();
			return;
		}
		// now start a new vector with empty sets
		Pack zero(0);
		data_.erase();

		n_pack_         = ( 1 + (end_ - 1) / n_bit_ );
		size_t i        = n_set_ * n_pack_;

		if( i > 0 )
		{	data_.extend(i);
			while(i--)
				data_[i] = zero;
		}

		// values that signify past end of list
		next_index_   = n_set_;
		next_element_ = end_;
	}
开发者ID:ZiiCee,项目名称:OPTI,代码行数:36,代码来源:sparse_pack.hpp

示例4: resize

	/*! Change number of sets, set end, and initialize all sets as empty

	Any memory currently allocated for this object is freed. If both
	\a n_set_in and \a end_in are non-zero new memory is allocated, otherwise
	no new memory is allocated for the object.

	\param n_set_in
	is the number of sets in this vector of sets.

	\param end_in
	is the maximum element plus one (the minimum element is 0).
	*/
	void resize(size_t n_set_in, size_t end_in) 
	{	Pack zero(0);
		data_.erase();

		n_set_          = n_set_in;
		end_            = end_in;
		n_pack_         = ( 1 + (end_ - 1) / n_bit_ );
		size_t i        = n_set_ * n_pack_;

		if( i > 0 )
		{	data_.extend(i);
			while(i--)
				data_[i] = zero;
		}

		// values that signify past end of list
		next_index_   = n_set_;
		next_element_ = end_;
	}
开发者ID:AndreasBrack,项目名称:WahlkreisSeminar,代码行数:31,代码来源:sparse_pack.hpp


注:本文中的pod_vector::erase方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。