Developer Documentation
RAVL, Recognition And Vision Library
USER HOME PAGE CLASS LIST CONTENTS
Ravl - Core - Graphs - GraphBaseLinearIterC
 

  PUBLIC
GraphBaseLinearIterC::GraphBaseLinearIterC(GraphBaseC &)
GraphBaseLinearIterC::First(void)
GraphBaseLinearIterC::Next(void)
GraphBaseLinearIterC::operator ++(int)
GraphBaseLinearIterC::operator ++(void)
GraphBaseLinearIterC::IsElm(void) const
GraphBaseLinearIterC::operator bool(void) const
GraphBaseLinearIterC::IsCycle(void) const
GraphBaseLinearIterC::NodesRemaining(void) const
GraphBaseLinearIterC::Node(void)
GraphBaseLinearIterC::Node(void) const
GraphBaseLinearIterC::DoneNode(GraphNodeBaseC &)

   GraphBaseLinearIterC   
 
Iterate through nodes of an acyclic directed graph in an order consistant with the nodes direction.
 
include "Ravl/GraphBaseLinearIter.hh"
Created:9/12/1996 
Source file:Ravl/Core/Container/Graph/GraphBaseLinearIter.hh
User Level:Develop
Library:RavlCore
In Scope:RavlN

Comments:
This effectively does a toplogical sort on the graph.

NB. This class uses the node Markers !! So you can only use single iter at a time.

Derived Classes: Variables:
GraphBaseC graph;
Relavent graph.

StackC open;
Queue of open nodes.

SArray1dC markers;
Array of markers.

IntT nodesLeft;
Number of unprocessed nodes.

Methods:
GraphBaseLinearIterC(GraphBaseC & aGraph)
Constructor

bool First()
Goto first.

bool Next()
Goto next node.
AMMA compatability function, use ++

void operator ++(int)
Goto next node.

bool operator ++()
Goto next node.
Return true if it is a valid element.

bool IsElm() const
At a valid element ? AMMA compatability function, use 'operator bool()'

operator bool() const
Test if the iterator is valid.

bool IsCycle() const
Results only valid after iteration complete. i.e. IsElm() returns False.

IntT NodesRemaining() const
Return the number of unprocessed nodes. Directly after First(), this will be the number of nodes in the graph - 1.

GraphNodeBaseC & Node(void)
Get current node.

const GraphNodeBaseC & Node(void) const
Get current node.

void DoneNode(GraphNodeBaseC & Nd)


Maintainer:Charles Galambos, Created: 9/12/1996, Documentation by CxxDoc: Tue Aug 13 09:59:30 2002