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


C++ NonConstVect::end方法代码示例

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


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

示例1: scaler

/*private*/
void
ScaledNoder::scale(SegmentString::NonConstVect& segStrings) const
{
	Scaler scaler(*this);
	for (SegmentString::NonConstVect::const_iterator
		i0=segStrings.begin(), i0End=segStrings.end();
			i0!=i0End; ++i0)
	{
		SegmentString* ss=*i0;

		CoordinateSequence* cs=ss->getCoordinates();

#ifndef NDEBUG
		size_t npts = cs->size();
#endif
		cs->apply_rw(&scaler);
		assert(cs->size() == npts);

		// Actually, we should be creating *new*
		// SegmentStrings here, but who's going
		// to delete them then ? And is it worth
		// the memory cost ?
		cs->removeRepeatedPoints();

	}
}
开发者ID:drownedout,项目名称:datamap,代码行数:27,代码来源:ScaledNoder.cpp

示例2:

/*public*/
void
SimpleSnapRounder::computeVertexSnaps(const SegmentString::NonConstVect& edges)
{
	for (SegmentString::NonConstVect::const_iterator
			i0=edges.begin(), i0End=edges.end();
			i0!=i0End; ++i0)
	{
		NodedSegmentString* edge0 = dynamic_cast<NodedSegmentString*>(*i0);
		assert(edge0);
		for (SegmentString::NonConstVect::const_iterator
				i1=edges.begin(), i1End=edges.end();
				i1!=i1End; ++i1)
		{
			NodedSegmentString* edge1 = dynamic_cast<NodedSegmentString*>(*i1);
			assert(edge1);
			computeVertexSnaps(edge0, edge1);
		}
	}
}
开发者ID:Joe-xXx,项目名称:geos,代码行数:20,代码来源:SimpleSnapRounder.cpp

示例3:

/*public*/
void
MCIndexSnapRounder::computeVertexSnaps(SegmentString::NonConstVect& edges)
{
	SegmentString::NonConstVect::iterator i=edges.begin(), e=edges.end();
	for (; i!=e; ++i)
	{
		NodedSegmentString* edge0 =
			dynamic_cast<NodedSegmentString*>(*i);
		assert(edge0);
		computeVertexSnaps(edge0);
	}
}
开发者ID:52North,项目名称:IlwisCore,代码行数:13,代码来源:MCIndexSnapRounder.cpp

示例4: nv

/*private*/
void
SimpleSnapRounder::checkCorrectness(
		SegmentString::NonConstVect& inputSegmentStrings)
{
  SegmentString::NonConstVect resultSegStrings;
  NodedSegmentString::getNodedSubstrings(
    inputSegmentStrings.begin(), inputSegmentStrings.end(), &resultSegStrings
  );

  NodingValidator nv(resultSegStrings);

  try {
    nv.checkValid();
  }

  catch (const std::exception &ex) {

    for ( SegmentString::NonConstVect::iterator i=resultSegStrings.begin(),
                                                e=resultSegStrings.end();
          i!=e; ++i )
    {
      delete *i;
    }

    std::cerr << ex.what() << std::endl;
    throw;
  }

  for ( SegmentString::NonConstVect::iterator i=resultSegStrings.begin(),
                                              e=resultSegStrings.end();
        i!=e; ++i )
  {
    delete *i;
  }
 
}
开发者ID:Joe-xXx,项目名称:geos,代码行数:37,代码来源:SimpleSnapRounder.cpp

示例5:

/* public static */
void
NodedSegmentString::getNodedSubstrings(
	const SegmentString::NonConstVect& segStrings,
	SegmentString::NonConstVect *resultEdgeList)
{
	assert(resultEdgeList);
	for ( SegmentString::NonConstVect::const_iterator
		i=segStrings.begin(), iEnd=segStrings.end();
		i != iEnd; ++i )
	{
		NodedSegmentString* ss = dynamic_cast<NodedSegmentString*>(*i);
		assert(ss);
		ss->getNodeList().addSplitEdges(resultEdgeList);
	}
}
开发者ID:AvlWx2014,项目名称:basemap,代码行数:16,代码来源:NodedSegmentString.cpp

示例6: rescaler

/*private*/
void
ScaledNoder::rescale(SegmentString::NonConstVect& segStrings) const
{
	ReScaler rescaler(*this);
	for (SegmentString::NonConstVect::const_iterator
		i0=segStrings.begin(), i0End=segStrings.end();
			i0!=i0End; ++i0)
	{

		SegmentString* ss=*i0;

		ss->getCoordinates()->apply_rw(&rescaler);

	}
}
开发者ID:drownedout,项目名称:datamap,代码行数:16,代码来源:ScaledNoder.cpp

示例7: throw

/* private */
void
BufferBuilder::computeNodedEdges(SegmentString::NonConstVect& bufferSegStrList,
		const PrecisionModel *precisionModel) // throw(GEOSException)
{
	Noder* noder = getNoder( precisionModel );

	noder->computeNodes(&bufferSegStrList);

	SegmentString::NonConstVect* nodedSegStrings = \
			noder->getNodedSubstrings();


	for (SegmentString::NonConstVect::iterator
		i=nodedSegStrings->begin(), e=nodedSegStrings->end();
		i!=e;
		++i)
	{
		SegmentString* segStr = *i;
		const Label* oldLabel = static_cast<const Label*>(segStr->getData());

		CoordinateSequence* cs = CoordinateSequence::removeRepeatedPoints(segStr->getCoordinates());
		if ( cs->size() < 2 ) 
		{
			delete cs; // we need to take care of the memory here as cs is a new sequence
			return; // don't insert collapsed edges
		}
		// we need to clone SegmentString coordinates
		// as Edge will take ownership of them
		// TODO: find a way to transfer ownership instead
		// Who will own the edge ? FIXME: find out and handle that!
		Edge* edge = new Edge(cs, new Label(*oldLabel));

		// will take care of the Edge ownership
		insertUniqueEdge(edge);
	}

	if ( nodedSegStrings != &bufferSegStrList )
	{
		delete nodedSegStrings;
	}

	if ( noder != workingNoder ) delete noder;
}
开发者ID:DexterW,项目名称:django-webservice-tools,代码行数:44,代码来源:BufferBuilder.cpp

示例8: TopologyException

/* private */
void
NodingValidator::checkEndPtVertexIntersections(const Coordinate& testPt,
		const SegmentString::NonConstVect& segStrings) const
{
	for (SegmentString::NonConstVect::const_iterator
		it = segStrings.begin(), itEnd = segStrings.end();
		it != itEnd;
		++it)
	{
		const SegmentString* ss0 = *it;
		const CoordinateSequence& pts = *(ss0->getCoordinates());
		for (unsigned int j=1, n=pts.size()-1; j<n; ++j)
		{
			if (pts[j].equals(testPt))
			{
				stringstream s;
				s<<"found endpt/interior pt intersection ";
				s<<"at index "<<j<<" :pt "<<testPt;
				throw util::TopologyException(s.str());
			}
		}
	}
}
开发者ID:h4ck3rm1k3,项目名称:geos,代码行数:24,代码来源:NodingValidator.cpp

示例9:

/*public*/
void
MCIndexSnapRounder::computeVertexSnaps(SegmentString::NonConstVect& edges)
{
	for_each(edges.begin(), edges.end(), bind1st(mem_fun(&MCIndexSnapRounder::computeEdgeVertexSnaps), this));
}
开发者ID:lozpeng,项目名称:applesales,代码行数:6,代码来源:MCIndexSnapRounder.cpp


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