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.7 Parameterized Planar Maps ( PLANAR MAP<br />

)<br />

1. Definition<br />

A parameterized planar map M is a planar map whose nodes, edges and faces contain<br />

additional (user defined) data. Every node contains an element of a data type vtype,<br />

called the node type of M,every edge contains an element of a data type etype, called the<br />

edge type of M, and every face contains an element of a data type ftype called the face<br />

type of M. All operations of the data type planar map are also defined for instances of<br />

any parameterized planar map type. For parameterized planar maps there are additional<br />

operations to access or update the node and face entries.<br />

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

2. Creation<br />

PLANAR MAP<br />

M(const GRAPH & G);<br />

creates an instance M of type PLANAR MAP<br />

and initializes it to the planar map represented by the parameterized<br />

directed graph G. <strong>The</strong> node and edge entries of G are copied<br />

into the corresponding nodes and edges of M. Every face f of M<br />

is assigned the default value of type ftype.<br />

Precondition: G represents a planar map.<br />

3. Operations<br />

const vtype& M.inf(node v) returns the information of node v.<br />

const etype& M.inf(edge e) returns the information of node v.<br />

const ftype& M.inf(face f) returns the information of face f.<br />

vtype& M[node v] returns a reference to the information of node v.<br />

etype& M[edge e] returns a reference to the information of edge e.<br />

ftype& M[face f] returns a reference to the information of face f.<br />

void M.assign(node v, const vtype& x)<br />

makes x the information of node v.<br />

void M.assign(edge e, const etype& x)<br />

makes x the information of node v.

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

Saved successfully!

Ooh no, something went wrong!