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.

• Mark is a data accessor that has access to a boolean value that is associated with<br />

each node of the graph<br />

3. Operations<br />

int algorithm.state( ) returns the internal state.<br />

• NEXT OUT =first phase,<br />

• NEXT ORDER =order phase,<br />

• NEXT IN=second phase,<br />

• NEXT DONE =algorithm finished<br />

void algorithm.finish algo( )<br />

executes the algorithm until finished( ) is true.<br />

bool algorithm.finished( ) returns true if the algorithm is finished.<br />

InSt& algorithm.get in stack( )<br />

In algorithm.in current( )<br />

OutSt& algorithm.get out stack( )<br />

Out algorithm.out current( )<br />

itnodetype algorithm.current node( )<br />

int algorithm.compnumb( )<br />

gives direct access to the internal stack of incoming<br />

adjacency iterators.<br />

returns the current iterator of the internal stack of<br />

incoming adjacency iterators.<br />

gives direct access to the internal stack of outgoing<br />

adjacency iterators.<br />

returns the current iterator of the internal stack of<br />

outgoing adjacency iterators.<br />

returns the current node.<br />

returns the component number of the fixed node of<br />

the current iterator if current state is NEXT IN.<br />

int algorithm.next( ) Performs one iteration of the core loop of the algorithm.<br />

4. Implementation<br />

Each operation requires constant time. <strong>The</strong> algorithm has running time O(|V | + |E|).

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

Saved successfully!

Ooh no, something went wrong!