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.14 Graph Drawing Algorithms ( graph draw )<br />

This section gives a summary of the graph drawing algorithms contained in <strong>LEDA</strong>. Before<br />

using them the header file has to be included.<br />

int<br />

STRAIGHT LINE EMBED MAP(graph& G, node array& xcoord,<br />

node array& ycoord)<br />

STRAIGHT LINE EMBED MAP takes as argument<br />

a graph G representing a planar map. It computes<br />

a straight line embedding of G by assigning<br />

non-negative integer coordinates (xcoord and<br />

ycoord) in the range 0..2(n − 1) to the nodes.<br />

STRAIGHT LINE EMBED MAP returns the maximal<br />

coordinate. <strong>The</strong> algorithm ([31]) has running<br />

time O(|V | 2 ).<br />

int<br />

STRAIGHT LINE EMBEDDING(graph& G, node array& xc,<br />

node array& yc)<br />

STRAIGHT LINE EMBEDDING takes as argument<br />

a planar graph G and computes a straight line embedding<br />

of G by assigning non-negative integer coordinates<br />

(xcoord and ycoord) in the range 0..2(n − 1)<br />

to the nodes. <strong>The</strong> algorithm returns the maximal coordinate<br />

and has running time O(|V | 2 ).<br />

bool<br />

VISIBILITY REPRESENTATION(graph& G, node array& x pos,<br />

node array& y pos,<br />

node array& x rad,<br />

node array& y rad,<br />

edge array& x sanch,<br />

edge array& y sanch,<br />

edge array& x tanch,<br />

edge array& y tanch)<br />

computes a visibility representation of the graph G,<br />

i.e., each node is represented by a horizontal segment<br />

(or box) and each edge is represented by a vertical<br />

segment.<br />

Precondition: G must be planar and has to contain at<br />

least three nodes.

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

Saved successfully!

Ooh no, something went wrong!