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


C++ vector::clear方法代码示例

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


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

示例1: clear

		/// inform CppAD that this information needs to be recomputed
		void clear(void)
		{	color_method = "cppad.symmetric";
			row.clear();
			col.clear();
			order.clear();
			color.clear();
		}
开发者ID:ChinaQuants,项目名称:QuantLibAdjoint,代码行数:8,代码来源:sparse_hessian.hpp

示例2: clear

		/// inform CppAD that this information needs to be recomputed
		void clear(void)
		{	user_row.clear();
			user_col.clear();
			sort_row.clear();
			sort_col.clear();
			color.clear();
		}
开发者ID:bubuker,项目名称:keggle_santa,代码行数:8,代码来源:sparse_jacobian.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 )
		{	// free all memory connected with data_
			data_.clear();
			return;
		}
		// now start a new vector with empty sets
		data_.resize(n_set_);

		// value that signfies past end of list
		next_index_ = n_set_;
	}
开发者ID:markpayneatwork,项目名称:adcomp,代码行数:26,代码来源:sparse_set.hpp

示例4: clear

		/// inform CppAD that this information needs to be recomputed
		void clear(void)
		{	order.clear();
			color.clear();
		}
开发者ID:TheoMichelot,项目名称:adcomp,代码行数:5,代码来源:sparse_hessian.hpp

示例5: clear

		/// reset coloring method to its default and
		/// inform CppAD that color and order need to be recomputed
		void clear(void)
		{	color_method = "cppad";
			order.clear();
			color.clear();
		}
开发者ID:TheoMichelot,项目名称:adcomp,代码行数:7,代码来源:sparse_jacobian.hpp


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