예제 #1
0
/*public*/
void
MCIndexNoder::computeNodes(SegmentString::NonConstVect* inputSegStrings)
{
	nodedSegStrings = inputSegStrings;
	assert(nodedSegStrings);

	for_each(nodedSegStrings->begin(), nodedSegStrings->end(),
			bind1st(mem_fun(&MCIndexNoder::add), this));

	intersectChains();
//cerr<<"MCIndexNoder: # chain overlaps = "<<nOverlaps<<endl;
}
예제 #2
0
vector<SegmentString*> *
MCQuadtreeNoder::node(vector<SegmentString*> *inputSegStrings)
{
	for(int i=0; i<(int)inputSegStrings->size();i++) {
		add((*inputSegStrings)[i]);
	}

	intersectChains();
	//System.out.println("MCQuadtreeNoder: # chain overlaps = " + nOverlaps);

	vector<SegmentString*> *nodedSegStrings=getNodedEdges(inputSegStrings);

	return nodedSegStrings;
}
/*public*/
void
MCIndexSegmentSetMutualIntersector::process(SegmentString::ConstVect* segStrings)
{
    processCounter = indexCounter + 1;
    nOverlaps = 0;

    monoChains.clear();

    for(SegmentString::ConstVect::size_type i = 0, n = segStrings->size(); i < n; i++) {
        SegmentString* seg = (SegmentString*)((*segStrings)[i]);
        addToMonoChains(seg);
    }
    intersectChains();
}
/*public*/
void 
MCIndexSegmentSetMutualIntersector::process(SegmentString::ConstVect * segStrings)
{
    processCounter = indexCounter + 1;
    nOverlaps = 0;

    for (MonoChains::iterator i = monoChains.begin(), e = monoChains.end();
         i != e; i++)
    {
      delete *i;
    }
    monoChains.clear();

    for (SegmentString::ConstVect::size_type i = 0, n = segStrings->size(); i < n; i++)
    {
        SegmentString * seg = (SegmentString *)((*segStrings)[i]);
        addToMonoChains( seg);
    }
    intersectChains();
}