geos::geomgraph::index::SimpleSweepLineIntersector Class Reference

Finds all intersections in one or two sets of edges, using a simple x-axis sweepline algorithm. More...

`#include <SimpleSweepLineIntersector.h>`

Inheritance diagram for geos::geomgraph::index::SimpleSweepLineIntersector:

## Public Member Functions

void | computeIntersections (std::vector< Edge * > *edges, SegmentIntersector *si, bool testAllSegments) override
| Computes all self-intersections between edges in a set of edges, allowing client to choose whether self-intersections are computed.
void | computeIntersections (std::vector< Edge * > *edges0, std::vector< Edge * > *edges1, SegmentIntersector *si) override
| Computes all mutual intersections between two sets of edges.

## Detailed Description

Finds all intersections in one or two sets of edges, using a simple x-axis sweepline algorithm.

While still O(n^2) in the worst case, this algorithm drastically improves the average-case time.

## Member Function Documentation

## computeIntersections() [1/2]

void geos::geomgraph::index::SimpleSweepLineIntersector::computeIntersections | ( | std::vector< Edge * > * | edges,
|  | SegmentIntersector * | si,
|  | bool | testAllSegments )

override virtual

Computes all self-intersections between edges in a set of edges, allowing client to choose whether self-intersections are computed.

Parameters

  edges | a list of edges to test for intersections
  si | the SegmentIntersector to use
  testAllSegments | true if self-intersections are to be tested as well

Implements geos::geomgraph::index::EdgeSetIntersector.

Referenced by computeIntersections().

## computeIntersections() [2/2]

void geos::geomgraph::index::SimpleSweepLineIntersector::computeIntersections | ( | std::vector< Edge * > * | edges0,
|  | std::vector< Edge * > * | edges1,
|  | SegmentIntersector * | si )

override virtual

Computes all mutual intersections between two sets of edges.

Implements geos::geomgraph::index::EdgeSetIntersector.

References computeIntersections().

The documentation for this class was generated from the following file:

- SimpleSweepLineIntersector.h