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; }
If g
is not Euler then the resulted tour will not be full or closed.
#include <lemon/euler.h>
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 |
| |
UEulerIt & | operator++ () |
Next edge of the tour. | |
Edge | operator++ (int) |
Postfix incrementation. |
_g | An undirected graph. | |
start | The starting point of the tour. If it is not given the tour will start from the first node. |
Edge operator++ | ( | int | ) | [inline] |
Edge
, not an UEulerIt, as one may expect.