EulerIt< Graph > Class Template Reference
[Connectivity and other graph properties]


Detailed Description

template<class Graph>
class lemon::EulerIt< Graph >

This iterator converts to the Edge type of the graph and using operator ++ it provides an Euler tour of a directed graph (if there exists).

For example if the given graph if Euler (i.e it has only one nontrivial component and the in-degree is equal to the out-degree for all nodes), the following code will put the edges of g to the vector et according to an Euler tour of g.

       std::vector<ListGraph::Edge> et;
       for(EulerIt<ListGraph> e(g),e!=INVALID;++e)
         et.push_back(e);
If g is not Euler then the resulted tour will not be full or closed.
See also:
UEulerIt
Todo:
Test required
#include <lemon/euler.h>

List of all members.

Public Member Functions

 EulerIt (const Graph &_g, typename Graph::Node start=INVALID)
 Constructor.
 operator Edge ()
 Edge Conversion.
EulerItoperator++ ()
 Next edge of the tour.
Edge operator++ (int)
 Postfix incrementation.


Constructor & Destructor Documentation

EulerIt ( const Graph _g,
typename Graph::Node  start = INVALID 
) [inline]

Parameters:
_g A directed graph.
start The starting point of the tour. If it is not given the tour will start from the first node.


Member Function Documentation

Edge operator++ ( int   )  [inline]

Warning:
This incrementation returns an Edge, not an EulerIt, as one may expect.


Generated on Thu Jun 4 04:04:06 2009 for LEMON by  doxygen 1.5.9