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<br />

void<br />

G.move edge(edge e, node v, edge e2 , int d = leda :: behind)<br />

moves edge e to source v and target target(e2) by<br />

appending it to adj edges(v)) and inserting it in<br />

front of (if d = leda :: before) or behind (if d =<br />

leda :: behind) edge e2 into in edges(target(e2)) (if<br />

G is directed) or adj edges(target(e2)) (if G is undirected).<br />

G.move edge(edge e, edge e1 , edge e2 , int d1 = leda :: behind,<br />

int d2 = leda :: behind)<br />

moves edge e to source source(e1) and target<br />

target(e2) by inserting it in front of (if d1 =<br />

leda :: before) or behind (if d1 = leda :: behind) edge<br />

e1 into adj edges(source(e1)) and in front of (if<br />

d2 = leda :: before) or behind (if d2 = leda :: behind)<br />

edge e2 into in edges(target(e2)) (if G is directed)<br />

or adj edges(target(e2)) (if G is undirected).<br />

edge G.rev edge(edge e) reverses e (move edge(e, target(e), source(e))).<br />

void G.rev all edges( ) reverses all edges of G.<br />

void G.sort nodes(int (∗cmp)(const node& , const node& ))<br />

the nodes of G are sorted according to the ordering<br />

defined by the comparing function cmp. Subsequent<br />

executions of forall nodes step through the nodes in<br />

this order. (cf. TOPSORT1 in section 12).<br />

void G.sort edges(int (∗cmp)(const edge& , const edge& ))<br />

void G.sort nodes(const node array& A)<br />

void G.sort edges(const edge array& A)<br />

the edges of G and all adjacency lists are sorted according<br />

to the ordering defined by the comparing<br />

function cmp. Subsequent executions of forall edges<br />

step through the edges in this order. (cf. TOP-<br />

SORT1 in section 12).<br />

the nodes of G are sorted according to the entries of<br />

node array A (cf. section 11.8).<br />

Precondition: T must be numerical, i.e., number<br />

type int, float, double,<br />

integer,<br />

rational or real.<br />

the edges of G are sorted according to the entries of<br />

edge array A (cf. section 11.9).<br />

Precondition: T must be numerical, i.e., number<br />

type int, float, double,<br />

integer,<br />

rational or real.

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

Saved successfully!

Ooh no, something went wrong!