Class SimpleSweepLineIntersector
- java.lang.Object
-
- com.vividsolutions.jts.geomgraph.index.EdgeSetIntersector
-
- com.vividsolutions.jts.geomgraph.index.SimpleSweepLineIntersector
-
public class SimpleSweepLineIntersector extends EdgeSetIntersector
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.- Version:
- 1.7
-
-
Constructor Summary
Constructors Constructor Description SimpleSweepLineIntersector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcomputeIntersections(java.util.List edges, SegmentIntersector si, boolean testAllSegments)Computes all self-intersections between edges in a set of edges, allowing client to choose whether self-intersections are computed.voidcomputeIntersections(java.util.List edges0, java.util.List edges1, SegmentIntersector si)Computes all mutual intersections between two sets of edges.
-
-
-
Method Detail
-
computeIntersections
public void computeIntersections(java.util.List edges, SegmentIntersector si, boolean testAllSegments)Description copied from class:EdgeSetIntersectorComputes all self-intersections between edges in a set of edges, allowing client to choose whether self-intersections are computed.- Specified by:
computeIntersectionsin classEdgeSetIntersector- Parameters:
edges- a list of edges to test for intersectionssi- the SegmentIntersector to usetestAllSegments- true if self-intersections are to be tested as well
-
computeIntersections
public void computeIntersections(java.util.List edges0, java.util.List edges1, SegmentIntersector si)Description copied from class:EdgeSetIntersectorComputes all mutual intersections between two sets of edges.- Specified by:
computeIntersectionsin classEdgeSetIntersector
-
-