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.

12.13 Algorithms for Planar Graphs (<br />

plane graph alg )<br />

node<br />

bool<br />

ST NUMBERING(const graph& G, node array& stnum,<br />

list& stlist, edge e st = nil)<br />

ST NUMBERING computes an st-numbering of G. If<br />

e st is nil then t is set to some arbitrary node of G.<br />

<strong>The</strong> node s is set to a neighbor of t and is returned.<br />

If e st is not nil then s is set to the source of e st and<br />

t is set to its target. <strong>The</strong> nodes of G are numbered<br />

such that s has number 1, t has number n, and every<br />

node v different from s and t has a smaller and a<br />

larger numbered neighbor. <strong>The</strong> ordered list of nodes<br />

is returned in stlist. If G has no nodes then nil is<br />

returned and if G has exactly one node then this node<br />

is returned and given number one.<br />

Precondition: G is biconnected.<br />

PLANAR(graph& , bool embed = false)<br />

PLANAR takes as input a directed graph G(V, E) and<br />

performs a planarity test for it. G must not contain<br />

selfloops. If the second argument embed has value<br />

true and G is a planar graph it is transformed into<br />

a planar map (a combinatorial embedding such that<br />

the edges in all adjacency lists are in clockwise ordering).<br />

PLANAR returns true if G is planar and<br />

false otherwise. <strong>The</strong> algorithm ([45]) has running time<br />

O(|V | + |E|).<br />

bool<br />

PLANAR(graph& G, list& el, bool embed = false)<br />

PLANAR takes as input a directed graph G(V, E) and<br />

performs a planarity test for G. PLANAR returns<br />

true if G is planar and false otherwise. If G is not<br />

planar a Kuratowsky-Subgraph is computed and returned<br />

in el.<br />

bool<br />

CHECK KURATOWSKI(const graph& G, const list& el)<br />

returns true if all edges in el are edges of G and if the<br />

edges in el form a Kuratowski subgraph of G, returns<br />

false otherwise. Writes diagnostic output to cerr.

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

Saved successfully!

Ooh no, something went wrong!