void
SimpleSweepLineIntersector::computeIntersections(SegmentIntersector *si)
{
	nOverlaps=0;
	prepareEvents();
	for(unsigned int i=0; i<events.size(); ++i)
	{
		SweepLineEvent *ev=events[i];
		if (ev->isInsert())
		{
			processOverlaps(i,ev->getDeleteEventIndex(),ev,si);
		}
	}
}
void
SimpleMCSweepLineIntersector::computeIntersections(SegmentIntersector *si)
{
	nOverlaps=0;
	prepareEvents();
	for(size_t i=0; i<events.size(); ++i)
	{
		GEOS_CHECK_FOR_INTERRUPTS();
		SweepLineEvent *ev=events[i];
		if (ev->isInsert())
		{
			processOverlaps(i, ev->getDeleteEventIndex(), ev, si);
		}
		if (si->getIsDone())
		{
			break;
		}
	}
}
void
SweepLineIndex::computeOverlaps(SweepLineOverlapAction *action)
{
    nOverlaps = 0;
    
    buildIndex();

    const std::vector<SweepLineEvent*>::size_type n=events.size();
    for(std::vector<SweepLineEvent*>::size_type i=0; i<n; i++)
    {
        SweepLineEvent *ev=events[i];
        if (ev->isInsert())
        {
            processOverlaps(static_cast<int>(i),
                ev->getDeleteEventIndex(),
                ev->getInterval(), action);
        }
    }
}