Public Types | Public Member Functions | Related Functions

Orienter< GR, DM > Class Template Reference


Detailed Description

template<typename GR, typename DM>
class lemon::Orienter< GR, DM >

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.

Template Parameters:
GRThe type of the adapted graph. It must conform to the Graph concept. It can also be specified to be const.
DMThe 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>.
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.

#include <lemon/adaptors.h>

List of all members.

Public Types

typedef GR Graph
 The type of the adapted graph.
typedef DM DirectionMap
 The type of the direction edge map.

Public Member Functions

 Orienter (GR &graph, DM &direction)
 Constructor.
void reverseArc (const Arc &a)
 Reverses the given arc.

Related Functions

(Note that these are not member functions.)
template<typename GR , typename DM >
Orienter< const GR, DM > orienter (const GR &graph, DM &direction)
 Returns a read-only Orienter adaptor.

Constructor & Destructor Documentation

Orienter ( GR &  graph,
DM &  direction 
) [inline]

Constructor of the adaptor.


Member Function Documentation

void reverseArc ( const Arc &  a) [inline]

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

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines