StaticGraph::NodeIt Class Reference

#include <graph.h>

Inheritance diagram for StaticGraph::NodeIt:

Inheritance graph
[legend]
Collaboration diagram for StaticGraph::NodeIt:

Collaboration graph
[legend]
List of all members.

Detailed Description

This iterator goes through each node. Its usage is quite simple, for example you can count the number of nodes in graph g of type Graph like this:
          int count=0;
          for (Graph::NodeIt n(g); n!=INVALID; ++n) ++count;

Definition at line 118 of file graph.h.

Public Member Functions

 NodeIt ()
 Default constructor.
 NodeIt (const NodeIt &)
 Copy constructor.
 NodeIt (Invalid)
 Invalid constructor & conversion.
 NodeIt (const StaticGraph &g)
 Sets the iterator to the first node.
 NodeIt (const StaticGraph &g, const Node &n)
 Node -> NodeIt conversion.
NodeItoperator++ ()
 Next node.


Constructor & Destructor Documentation

NodeIt  )  [inline]
 

Warning:
The default constructor sets the iterator to an undefined value.
Definition at line 124 of file graph.h.

NodeIt const NodeIt  )  [inline]
 

Copy constructor.Definition at line 129 of file graph.h.

NodeIt Invalid   )  [inline]
 

Initialize the iterator to be invalid.

See also:
Invalid for more details.
Definition at line 134 of file graph.h.

NodeIt const StaticGraph g  )  [inline]
 

Sets the iterator to the first node of g.Definition at line 139 of file graph.h.

NodeIt const StaticGraph g,
const Node n
[inline]
 

Sets the iterator to the node of g pointed by the trivial iterator n. This feature necessitates that each time we iterate the edge-set, the iteration order is the same. Definition at line 146 of file graph.h.


Member Function Documentation

NodeIt& operator++  )  [inline]
 

Assign the iterator to the next node.Definition at line 151 of file graph.h.


The documentation for this class was generated from the following file:
Generated on Thu Sep 30 12:18:40 2004 for LEMON by doxygen 1.3.8