- 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 | Classes | Public Member Functions | Static Public Member Functions | Related Functions
SplitNodes< DGR > Class Template Reference
Adaptor Classes for Graphs

## Detailed Description

### template<typename DGR>
class lemon::SplitNodes< DGR >

SplitNodes adaptor can be used for splitting each node into an in-node and an out-node in a digraph. Formaly, the adaptor replaces each node in the digraph with two nodes, namely node and node . If there is a arc in the original digraph, then the new target of the arc will be and similarly the source of each original arc will be . The adaptor adds an additional bind arc from to for each node of the original digraph.

The aim of this class is running an algorithm with respect to node costs or capacities if the algorithm considers only arc costs or capacities directly. In this case you can use `SplitNodes` adaptor, and set the node costs/capacities of the original digraph to the bind arcs in the adaptor.

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

Template Parameters

  DGR | The type of the adapted digraph. It must conform to the Digraph concept. It is implicitly `const`.

Note
  The `Node` type of this adaptor is converible to the `Node` type of the adapted digraph.

`#include <lemon/adaptors.h>`

## Classes
class | CombinedArcMap
| Arc map combined from an arc map and a node map of the original digraph. More...
class | CombinedNodeMap
| Node map combined from two original node maps. More...

## Public Member Functions
| SplitNodes (const DGR &g)
| Constructor. More...

## Static Public Member Functions
static bool | inNode (const Node &n)
| Returns `true` if the given node is an in-node. More...
static bool | outNode (const Node &n)
| Returns `true` if the given node is an out-node. More...
static bool | origArc (const Arc &a)
| Returns `true` if the given arc is an original arc. More...
static bool | bindArc (const Arc &a)
| Returns `true` if the given arc is a bind arc. More...
static Node | inNode (const DigraphNode &n)
| Returns the in-node created from the given original node. More...
static Node | outNode (const DigraphNode &n)
| Returns the out-node created from the given original node. More...
static Arc | arc (const DigraphNode &n)
| Returns the bind arc that corresponds to the given original node. More...
static Arc | arc (const DigraphArc &a)
| Returns the arc that corresponds to the given original arc. More...
template<typename IN , typename OUT >
static CombinedNodeMap< IN, OUT > | combinedNodeMap (IN &in_map, OUT &out_map)
| Returns a combined node map. More...
template<typename ArcMap , typename NodeMap >
static CombinedArcMap< ArcMap, NodeMap > | combinedArcMap (ArcMap &arc_map, NodeMap &node_map)
| Returns a combined arc map. More...

## Related Functions
(Note that these are not member functions.)
template<typename DGR >
SplitNodes< DGR > | splitNodes (const DGR &digraph)
| Returns a (read-only) SplitNodes adaptor. More...

## Constructor & Destructor Documentation

SplitNodes | ( | const DGR & | g | ) |
| inline

Constructor of the adaptor.

## Member Function Documentation

static bool inNode | ( | const Node & | n | ) |
| inline static

Returns `true` if the given node is an in-node.

static bool outNode | ( | const Node & | n | ) |
| inline static

Returns `true` if the given node is an out-node.

static bool origArc | ( | const Arc & | a | ) |
| inline static

Returns `true` if the given arc is one of the arcs in the original digraph.

static bool bindArc | ( | const Arc & | a | ) |
| inline static

Returns `true` if the given arc is a bind arc, i.e. it connects an in-node and an out-node.

static Node inNode | ( | const DigraphNode & | n | ) |
| inline static

Returns the in-node created from the given original node.

static Node outNode | ( | const DigraphNode & | n | ) |
| inline static

Returns the out-node created from the given original node.

static Arc arc | ( | const DigraphNode & | n | ) |
| inline static

Returns the bind arc in the adaptor that corresponds to the given original node, i.e. the arc connecting the in-node and out-node of `n`.

static Arc arc | ( | const DigraphArc & | a | ) |
| inline static

Returns the arc in the adaptor that corresponds to the given original arc.

static CombinedNodeMap<IN, OUT> combinedNodeMap | ( | IN & | in_map,
|  | OUT & | out_map
| ) |  |
| inline static

This function just returns a combined node map.

static CombinedArcMap<ArcMap, NodeMap> combinedArcMap | ( | ArcMap & | arc_map,
|  | NodeMap & | node_map
| ) |  |
| inline static

This function just returns a combined arc map.