Class: SimpleMCSweepLineIntersector

jsts.geomgraph.index.SimpleMCSweepLineIntersector

new SimpleMCSweepLineIntersector()

Finds all intersections in one or two sets of edges, using an x-axis sweepline algorithm in conjunction with Monotone Chains. While still O(n^2) in the worst case, this algorithm drastically improves the average-case time. The use of MonotoneChains as the items in the index seems to offer an improvement in performance over a sweep-line alone. A SimpleMCSweepLineIntersector creates monotone chains from the edges and compares them using a simple sweep-line along the x-axis.
Source:

Members

events :array

Type:
  • array
Source:

nOverlaps :int

statistics information
Type:
  • int
Source:

Methods

add(edge, edgeSet)

Parameters:
Name Type Description
edge Edge
edgeSet Object
Source:

addList(edges, edgeSet)

Parameters:
Name Type Description
edges javascript.util.List
edgeSet Object
Source:

addList2(edges, edgeSet)

Parameters:
Name Type Description
edges javascript.util.List
edgeSet Object
Source:

computeIntersections(edges, si, testAllSegments)

Parameters:
Name Type Description
edges javascript.util.List
si SegmentIntersector
testAllSegments boolean
Source:

computeIntersections2(edges0, edges1, si)

Parameters:
Name Type Description
edges0 javascript.util.List
edges1 javascript.util.List
si SegmentIntersector
Source:

computeIntersections3(si)

Parameters:
Name Type Description
si SegmentIntersector
Source:

prepareEvents()

Because Delete Events have a link to their corresponding Insert event, it is possible to compute exactly the range of events which must be compared to a given Insert event object.
Source:

processOverlaps(start, end, ev0, si)

Parameters:
Name Type Description
start int
end int
ev0 SweepLineEvent
si SegmentIntersector
Source: