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.

#include < <strong>LEDA</strong>/graph/graph iterator.h ><br />

2. Creation<br />

AdjIt it;<br />

introduces a variable it of this class associated with no graph.<br />

AdjIt it(const leda :: graph& G);<br />

introduces a variable it of this class associated with G. <strong>The</strong><br />

marked node is initialized by n = G.first node( ) and the edge<br />

by G.first adj edge(n).<br />

AdjIt it(const leda :: graph& G, leda :: node n);<br />

introduces a variable it of this class marked with n and associated<br />

with G. <strong>The</strong> marked edge is initialized by by G.first adj edge(n).<br />

Precondition: n is a node of G.<br />

AdjIt it(const leda :: graph& G, leda :: node n, leda :: edge e);<br />

introduces a variable it of this class marked with n and e and associated<br />

with G.<br />

Precondition: n is a node and e an edge of G and source(e) = n.<br />

3. Operations<br />

void it.init(const graphtype& G)<br />

void it.init(const graphtype& G, const nodetype& n)<br />

associates it with G and marks it with n’ =<br />

G.first node( ) and G.first adj edge(n’).<br />

associates it with G and marks it with n and<br />

G.first adj edge(v).<br />

Precondition: n is a node of G.<br />

void it.init(const graphtype& G, const nodetype& n, const edgetype& e)<br />

void it.update(leda :: edge e)<br />

associates it with G and marks it with n and e.<br />

Precondition: n is a node and e an edge of G and<br />

source(e) = n.<br />

it marks e afterwards.<br />

void it.reset( ) resets it to G.first adj edge(n) where G and n are the<br />

marked node and associated graph.<br />

void<br />

it.insert(const AdjIt& other)<br />

creates a new edge from the marked node of it to the<br />

marked node of other. it is marked with the new edge<br />

afterwards. <strong>The</strong> marked node of it does not change.

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

Saved successfully!

Ooh no, something went wrong!