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 it.update(leda :: node n)<br />

it marks n afterwards.<br />

void it.insert( ) creates a new node and it marks it afterwards.<br />

void it.del( ) deletes the marked node, i.e. it.valid( ) returns false<br />

afterwards.<br />

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

NodeIt&<br />

bool<br />

it = const NodeIt& it2<br />

it == const NodeIt& it2<br />

it is afterwards associated with the same graph and<br />

node as it2 . This method returns a reference to it.<br />

returns true if and only if it and it2 are equal, i.e. if<br />

the marked nodes are equal.<br />

leda :: node it.get node( ) returns the marked node or nil if it.valid( ) returns<br />

false.<br />

const leda :: graph& it.get graph( )<br />

returns the associated graph.<br />

bool it.valid( ) returns true if and only if end of sequence not yet<br />

passed, i.e. if there is a node in the node set that was<br />

not yet passed.<br />

bool it.eol( ) returns !it.valid( ) which is true if and only if there is<br />

no successor node left, i.e. if all nodes of the node set<br />

are passed (eol: end of list).<br />

NodeIt& ++it performs one step forward in the list of nodes of the associated<br />

graph. If there is no successor node, it.eol( )<br />

will be true afterwards. This method returns a reference<br />

to it.<br />

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

NodeIt& −−it performs one step backward in the list of nodes of<br />

the associated graph. If there is no predecessor node,<br />

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

a reference to it.<br />

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

4. Implementation<br />

Creation of an iterator and all methods take constant time.

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

Saved successfully!

Ooh no, something went wrong!