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);
g
is not Euler then the resulted tour will not be full or closed. #include <lemon/euler.h>
Public Member Functions | |
EulerIt (const Graph &_g, typename Graph::Node start=INVALID) | |
Constructor. | |
operator Edge () | |
Edge Conversion. | |
EulerIt & | operator++ () |
Next edge of the tour. | |
Edge | operator++ (int) |
Postfix incrementation. |
_g | A directed 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 EulerIt, as one may expect.