public class FastSegmentSetIntersectionFinder
extends java.lang.Object
SegmentStrings intersect.
Uses indexing for fast performance and to optimize repeated tests
against a target set of lines.
Short-circuited to return as soon an intersection is found.
Immutable and thread-safe.| Modifier and Type | Field and Description |
|---|---|
private SegmentSetMutualIntersector |
segSetMutInt |
| Constructor and Description |
|---|
FastSegmentSetIntersectionFinder(java.util.Collection baseSegStrings)
Creates an intersection finder against a given set of segment strings.
|
| Modifier and Type | Method and Description |
|---|---|
SegmentSetMutualIntersector |
getSegmentSetIntersector()
Gets the segment set intersector used by this class.
|
boolean |
intersects(java.util.Collection segStrings)
Tests for intersections with a given set of target
SegmentStrings. |
boolean |
intersects(java.util.Collection segStrings,
SegmentIntersectionDetector intDetector)
Tests for intersections with a given set of target
SegmentStrings. |
private final SegmentSetMutualIntersector segSetMutInt
public FastSegmentSetIntersectionFinder(java.util.Collection baseSegStrings)
baseSegStrings - the segment strings to search for intersectionspublic SegmentSetMutualIntersector getSegmentSetIntersector()
public boolean intersects(java.util.Collection segStrings)
SegmentStrings.segStrings - the SegmentStrings to testpublic boolean intersects(java.util.Collection segStrings,
SegmentIntersectionDetector intDetector)
SegmentStrings.
using a given SegmentIntersectionDetector.segStrings - the SegmentStrings to testintDetector - the intersection detector to use