31.01.2014 Views

Version 5.0 The LEDA User Manual

Version 5.0 The LEDA User Manual

Version 5.0 The LEDA User Manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

void SWEEP SEGMENTS(const list& S, GRAPH & G,<br />

bool embed = false, bool use optimization = true)<br />

as above.<br />

<strong>The</strong> algorithm ([11]) runs in time O((n + s) log n) + m), where n is the<br />

number of segments, s is the number of vertices of the graph G, and m<br />

is the number of edges of G. If S contains no overlapping segments then<br />

m = O(n+s). If embed is true the running time increases by O(m log m).<br />

If use optimization is true an optimization described in the <strong>LEDA</strong> book<br />

is used.<br />

void MULMULEY SEGMENTS(const list& S,<br />

GRAPH & G, bool embed = false)<br />

as above.<br />

<strong>The</strong>re is one additional output convention. If G is an undirected graph,<br />

the undirected planar map corresponding to G(s) is computed. <strong>The</strong> computation<br />

follows the incremental algorithm of Mulmuley ([68]) whose expected<br />

running time is O(M + s + n log n), where n is the number of<br />

segments, s is the number of vertices of the graph G, and m is the number<br />

of edges.<br />

void SEGMENT INTERSECTION(const list& S,<br />

void (∗report)(const segment& , const segment& ))<br />

takes a list of segments S as input and executes for every pair (s 1 , s 2 ) of<br />

intersecting segments report(s 1 , s 2 ). <strong>The</strong> algorithm ([6]) has running time<br />

O(nlog 2 n + k), where n is the number of segments and k is the number<br />

intersecting pairs of segments.<br />

void SEGMENT INTERSECTION(const list& S, list& P )<br />

takes a list of segments S as input, computes the set of (proper) intersection<br />

points between all segments in S and stores this set in P . <strong>The</strong><br />

algorithm ([11]) has running time O((|P | + |S|) log |S|).<br />

• Red-Blue Line Segment Intersection<br />

void SEGMENT INTERSECTION(const list& S1 , const list& S2 ,<br />

GRAPH & G, bool embed = false)<br />

takes two lists of segments S 1 and S 2 as input and computes the planar<br />

graph G induced by the set of straight line segments in S 1 ∪S 2 (as defined<br />

above). Precondition: Any pair of segments in S 1 or S 2 , respectively, does<br />

not intersect in a point different from one of the endpoints of the segments,<br />

i.e. segments of S 1 or S 2 are either pairwise disjoint or have a common<br />

endpoint.<br />

• Closest Pairs

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!