本文整理汇总了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();
}
}
示例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);
}
}
}
示例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);
}
}
示例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;
}
}
示例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);
}
}
示例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);
}
}
示例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;
}
示例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());
}
}
}
}
示例9:
/*public*/
void
MCIndexSnapRounder::computeVertexSnaps(SegmentString::NonConstVect& edges)
{
for_each(edges.begin(), edges.end(), bind1st(mem_fun(&MCIndexSnapRounder::computeEdgeVertexSnaps), this));
}