Orienter

Declared in lemon/adaptors.h, in the group Adaptor Classes for Graphs; the same class on the Doxygen site.

template< typename GR , typename DM >
class Orienter

Adaptor class for orienting the edges of a graph to get a digraph.

Orienter adaptor can be used for orienting the edges of a graph to get a digraph. A bool edge map of the underlying graph must be specified, which define the direction of the arcs in the adaptor. The arcs can be easily reversed by the reverseArc() member function of the adaptor. This class conforms to the Digraph concept.

The adapted graph can also be modified through this adaptor by adding or removing nodes or arcs, unless the GR template parameter is set to be const.

This class provides item counting in the same time as the adapted graph structure.

Note

The Node type of this adaptor and the adapted graph are convertible to each other, moreover the Arc type of the adaptor and the Edge type of the adapted graph are also convertible to each other.

Template Parameters:
  • GR – The type of the adapted graph. It must conform to the Graph concept. It can also be specified to be const.

  • DM – The type of the direction map. It must be a bool (or convertible) edge map of the adapted graph. The default type is GR::EdgeMap< bool >.

Public Types

typedef GR Graph

The type of the adapted graph.

typedef DM DirectionMap

The type of the direction edge map.

typedef Parent::Arc Arc

Public Functions

inline Orienter( GR & graph , DM & direction )

Constructor.

Constructor of the adaptor.

inline void reverseArc( const Arc & a )

Reverses the given arc.

This function reverses the given arc. It is done by simply negate the assigned value of a in the direction map.

Protected Functions

inline Orienter()