DiEulerIt< GR > Class Template Reference

- Main Page
- Modules
- Classes
- Namespaces
- Files
- Related Pages

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
List of all members | Public Member Functions
DiEulerIt< GR > Class Template Reference
Connectivity and Other Graph Properties

## Detailed Description

### template<typename GR>
class lemon::DiEulerIt< GR >

This iterator provides an Euler tour (Eulerian circuit) of a directed graph (if there exists) and it converts to the `Arc` type of the digraph.

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

* std::vector<ListDigraph::Arc> et;
* for(DiEulerIt<ListDigraph> e(g); e!=INVALID; ++e)
* et.push_back(e);
*

If `g` has no Euler tour, then the resulted walk will not be closed or not contain all arcs.

See Also
  EulerIt

`#include <lemon/euler.h>`

## Public Member Functions
| DiEulerIt (const GR &gr, typename GR::Node start=INVALID)
| Constructor. More...
| operator Arc ()
| Arc conversion.
bool | operator== (Invalid)
| Compare with `INVALID`.
bool | operator!= (Invalid)
| Compare with `INVALID`.
DiEulerIt & | operator++ ()
| Next arc of the tour. More...
Arc | operator++ (int)
| Postfix incrementation. More...

## Constructor & Destructor Documentation

DiEulerIt | ( | const GR & | gr,
|  | typename GR::Node | start = `INVALID`
| ) |  |
| inline

Constructor.

Parameters

  gr | A digraph.
  start | The starting point of the tour. If it is not given, the tour will start from the first node that has an outgoing arc.

## Member Function Documentation

DiEulerIt& operator++ | ( |  | ) |
| inline

Next arc of the tour

Arc operator++ | ( | int |  | ) |
| inline

Postfix incrementation.

Warning
  This incrementation returns an `Arc`, not a DiEulerIt, as one may expect.