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


C++ list::append方法代码示例

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


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

示例1: SeedExpansion

void SeedExpansion(Ellipse seed,int idCluster,std::list<Ellipse> ListSeed)
{
	// Custo do caminho do processo de expanssao da semente
	std::map<float,Ellipse,greater> open;
	// Lista de ellipse  que representa ellipes originais que podem vir a ser
	// usada no processo de agregacao
	std::vector<Ellipse> close;
	std::vector<Ellipse> Cluster;

	float mNexCostAggregation;
	int   mNextNumPointsAggregation;

	Ellipse mCurrentEllipse = seed;

	open.insert(std::make_pair(0,seed));

	while (open.size() > 0)
	{

		target = open.pop();


		float   cost 	 = target.first;
		Ellipse ellipse  = target.second;


		// Se o ponto ja foi expandido , tirar proximo elemento ta lista aberta
		if( (ellipse.mLastClusterID == idCluster) && (ellipse.mLastClusterCost < cost) )
		{
			continue;
		}

		// inclui apenas as ellipses para uma futura agregacao
		close.insert(target.second);
		// dado criterio de agregacao .. saber se para e gera um Ellipse
		if( Aggregation(close) == true  )
		{
			if( BIGELLIPSE )
			{

				close.insert(mCurrentEllipse);
				mCurrentEllipse = MakeEllipse(close);

			}
			else
			{
				mCurrentEllipse = MakeEllipse(new vector(close + Cluster));
			}

			if ( mCurrentEllipse.mError > MAX_ERROR )
			{

				while ( close.size() > 0 )
				{
					temp = close.pop();
					if (temp.mClusterID == -1)
					{
						ListSeed.append(temp);
					}
				}

				while ( open.size() > 0)
				{
					temp = open.pop();
					if (temp.mClusterID == -1)
					{
						ListSeed.append(temp);
					}


				}

			}
			else // mCurrentEllipse.mError < MAX_ERROR
			{
				UpdateAggregationCoditions();
				Cluster.append(close);
				while ( close.size() > 0)
				{
					temp = close.pop();
					if (temp.mError > mCurrentEllipse.mError)
					{
						temp.mError = mCurrentEllipse.mError;
						temp.mClusterID = idCluster;
					}
				}

			}



		} //if Aggregarion == True


		/// Similarity = dist(ellipse,mKNeighbor[i]) * w_1 +  (1-(ellipse.mNormal*mKNeighbor[i].mNormal)�) * w_2
		///	<Similarity,Ellipse>
		std::map<float,Ellipse> mKNeighbor;


		mKNeighbor = kNeighbor(ellipse,k);
//.........这里部分代码省略.........
开发者ID:duststorm,项目名称:lodpbr,代码行数:101,代码来源:agglomerative.cpp


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