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.

OutAdjIt& −−it performs one step backward in the list of outgoing<br />

edges of the marked node. If there is no predecesssor<br />

edge, it.eol( ) will be true afterwards. This method<br />

returns a reference to it.<br />

Precondition: it.valid( ) returns true.<br />

4. Implementation<br />

Creation of an iterator and all methods take constant time.<br />

13.6 Adjacency Iterators for incoming edges ( InAdjIt<br />

)<br />

1. Definition<br />

a variable it of class InAdjIt is an adjacency iterator that marks a node (which is fixed<br />

in contrast to linear node iterators) and iterates over the incoming edges of this node.<br />

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

2. Creation<br />

InAdjIt it;<br />

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

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

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

<strong>The</strong> node is initialized by G.first node( ) and the edge by<br />

G.first in edge(n) where n is the marked node.<br />

InAdjIt 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 G.first in edge(n).<br />

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

InAdjIt 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 target(e) = n.<br />

3. Operations<br />

void it.init(const leda :: graph& G)<br />

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

G.first node( ) and G.first adj edge(n’).

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

Saved successfully!

Ooh no, something went wrong!