UEulerIt Class Template Reference
[Topology related algorithms]

#include <lemon/euler.h>

List of all members.


Detailed Description

template<class Graph>
class lemon::UEulerIt< Graph >

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

For example if the given graph if Euler (i.e it has only one nontrivial component and the degree of each node is even), the following code will print the edge IDs according to an Euler tour of g.

       for(UEulerIt<ListUGraph> e(g),e!=INVALID;++e) {
         std::cout << g.id(UEdge(e)) << std::eol;
       }
Although the iterator provides an Euler tour of an undirected graph, in order to indicate the direction of the tour, UEulerIt returns directed edges (that convert to the undirected ones, of course).

If g is not Euler then the resulted tour will not be full or closed.

See also:
EulerIt
Todo:
Test required


Public Member Functions

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


Constructor & Destructor Documentation

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

Parameters:
_g An undirected 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 UEulerIt, as one may expect.


The documentation for this class was generated from the following file:
Generated on Tue Oct 31 09:50:14 2006 for LEMON by  doxygen 1.5.1