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.

11.6 Planar Maps ( planar map )<br />

1. Definition<br />

An instance M of the data type planar map is the combinatorial embedding of a planar<br />

graph, i.e., M is bidirected (for every edge (v, w) of M the reverse edge (w, v) is also in<br />

M) and there is a planar embedding of M such that for every node v the ordering of the<br />

edges in the adjacency list of v corresponds to the counter-clockwise ordering of these<br />

edges around v in the embedding.<br />

#include < <strong>LEDA</strong>/graph/planar map.h ><br />

2. Creation<br />

planar map M(const graph& G);<br />

creates an instance M of type planar map and initializes it to the<br />

planar map represented by the directed graph G.<br />

Precondition: G represents a bidirected planar map, i.e. for every<br />

edge (v, w) in G the reverse edge (w, v) is also in G and there is<br />

a planar embedding of G such that for every node v the ordering<br />

of the edges in the adjacency list of v corresponds to the counterclockwise<br />

ordering of these edges around v in the embedding.<br />

3. Operations<br />

edge M.new edge(edge e1 , edge e2 )<br />

inserts the edge e = (source(e 1 ), source(e 2 )) and its<br />

reversal into M and returns e.<br />

Precondition: e 1 and e 2 are bounding the same face<br />

F .<br />

<strong>The</strong> operation splits F into two new faces.<br />

face M.del edge(edge e) deletes the edge e and its reversal from M. <strong>The</strong> two<br />

faces adjacent to e are united to one new face which<br />

is returned.<br />

edge M.split edge(edge e) splits edge e = (v, w) and its reversal r = (w, v) into<br />

edges (v, u), (u, w), (w, u), and (u, v). Returns the<br />

edge (u, w).<br />

node<br />

M.new node(const list& el)<br />

splits the face bounded by the edges in el by inserting<br />

a new node u and connecting it to all source nodes<br />

of edges in el.<br />

Precondition: all edges in el bound the same face.<br />

node M.new node(face f) splits face f into triangles by inserting a new node u<br />

and connecting it to all nodes of f. Returns u.

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

Saved successfully!

Ooh no, something went wrong!