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 random bigraph(graph& G, int a, int b, int m, list& A,<br />

list& B, int k = 1)<br />

creates a random bipartite graph G with a nodes on<br />

side A, b nodes on side B, and m edges. All edges are<br />

directed from A to B.<br />

If k > 1 then A and B are divided into k groups of<br />

about equal size and the nodes in the i-th group of A<br />

have their edges to nodes in the i − 1-th and i + 1-th<br />

group in B. All indices are modulo k.<br />

void test bigraph(graph& G, list& A, list& B)<br />

void grid graph(graph& G, int n)<br />

creates interactively a user defined bipartite graph G<br />

with sides A and B. All edges are directed from A to<br />

B.<br />

creates a grid graph G with n × n nodes.<br />

void<br />

grid graph(graph& G, node array& xcoord,<br />

node array& ycoord, int n)<br />

creates a grid graph G of size n × n embedded into<br />

the unit square. <strong>The</strong> embedding is given by xcoord[v]<br />

and ycoord[v] for every node v of G.<br />

void d3 grid graph(graph& G, int n)<br />

void<br />

void<br />

creates a three-dimensional grid graph G with n×n×n<br />

nodes.<br />

d3 grid graph(graph& G, node array& xcoord,<br />

node array& ycoord, node array& zcoord,<br />

int n)<br />

creates a three-dimensional grid graph G of size n ×<br />

n×n embedded into the unit cube. <strong>The</strong> embedding is<br />

given by xcoord[v], ycoord[v], and zcoord[v] for every<br />

node v of G.<br />

cmdline graph(graph& G, int argc, char ∗ ∗argv)<br />

Planar graph: Combinatorial Constructions<br />

builds graph G as specified by the command line arguments:<br />

prog −→ test graph()<br />

prog n −→ complete graph(n)<br />

prog n m −→ test graph(n, m)<br />

prog file −→ G.read graph(file)<br />

A maximal planar map with n nodes, n ≥ 3, has 3n − 6 uedges. It is constructed<br />

iteratively. For n = 1, the graph consists of a single isolated node, for n = 2, the graph<br />

consists of two nodes and one uedge, for n = 3 the graph consists of three nodes and three

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

Saved successfully!

Ooh no, something went wrong!