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


Detailed Description

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

This iterator converts to the Edge (or UEdge) type of the graph and using operator ++ it provides an Euler tour of an undirected 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
#include <lemon/euler.h>

List of all members.

Public Member Functions

 UEulerIt (const Graph &_g, typename Graph::Node start=INVALID)
 Constructor.
 operator Edge () const
 Edge Conversion.
 operator UEdge () const
 Edge Conversion.
bool operator== (Invalid) const
 
bool operator!= (Invalid) const
 
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.


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