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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Note: <strong>The</strong>re are specialized versions of STL wrapper iterator classes for each kind of<br />

iterator that return different <strong>LEDA</strong> graph objects.<br />

class name<br />

NodeIt n<br />

EdgeIt e<br />

AdjIt n<br />

AdjIt e<br />

OutAdjIt n<br />

OutAdjIt e<br />

InAdjIt n<br />

InAdjIt e<br />

operator*() returns<br />

node<br />

edge<br />

node<br />

edge<br />

node<br />

edge<br />

node<br />

edge<br />

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

2. Creation<br />

STLNodeIt< DataAccessor, Iter > it(DataAccessor da, const Iter& base it);<br />

3. Operations<br />

introduces a variable it of this class bound to da and base it.<br />

STLNodeIt& it = typename DataAccessor :: value type i<br />

assigns the value i, i.e. set(DA, it, i) will be invoked<br />

where DA is the associated data accessor and it the<br />

associated iterator.<br />

bool<br />

bool<br />

it == const STLNodeIt& it2<br />

returns true if the associated values of it and it2 are<br />

equal, i.e. get(DA, cit)==get(DA, cit2 ) is true where<br />

cit is the associated iterator of it and cit2 is the associated<br />

iterator of it2 and DA is the associated data<br />

accessor.<br />

it != const STLNodeIt& it2<br />

returns false if the associated value equals the one<br />

of the given iterator.<br />

STLNodeIt& it.begin( )<br />

resets the iterator to the beginning of the sequence.<br />

STLNodeIt& it.last( )<br />

resets the iterator to the ending of the sequence.<br />

STLNodeIt& it.end( )<br />

makes the iterators invalid, i.e. past-the-end-value.

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

Saved successfully!

Ooh no, something went wrong!