Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

ResGraphAdaptor Class Template Reference
[Adaptor Classes for Graphs]

#include <lemon/graph_adaptor.h>

Inherits SubBidirGraphAdaptor< Graph, ResForwardFilter< Graph, Number, CapacityMap, FlowMap >, ResBackwardFilter< Graph, Number, CapacityMap, FlowMap > >.

Inheritance diagram for ResGraphAdaptor:

Inheritance graph
[legend]
List of all members.

Detailed Description

template<typename Graph, typename Number, typename CapacityMap, typename FlowMap>
class lemon::ResGraphAdaptor< Graph, Number, CapacityMap, FlowMap >

An adaptor for composing the residual graph for directed flow and circulation problems. Let $G=(V, A)$ be a directed graph and let $F$ be a number type. Let moreover $f,c:A\to F$ , be functions on the edge-set. In the appications of ResGraphAdaptor, $f$ usually stands for a flow and $c$ for a capacity function. Suppose that a graph instange g of type ListGraph implements $G$ .
  ListGraph g;
Then RevGraphAdaptor implements the graph structure with node-set $V$ and edge-set $A_{forward}\cup A_{backward}$ , where $A_{forward}=\{uv : uv\in A, f(uv)<c(uv)\}$ and $A_{backward}=\{vu : uv\in A, f(uv)>0\}$ , i.e. the so called residual graph. When we take the union $A_{forward}\cup A_{backward}$ , multilicities are counted, i.e. if an edge is in both $A_{forward}$ and $A_{backward}$ , then in the adaptor it appears twice. The following code shows how such an instance can be constructed.
  typedef ListGraph Graph;
  Graph::EdgeMap<int> f(g);
  Graph::EdgeMap<int> c(g);
  ResGraphAdaptor<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> > gw(g);
Author:
Marton Makai


Classes

class  ResCap
 Residual capacity map. More...


The documentation for this class was generated from the following file:
Generated on Sat Aug 27 14:15:35 2005 for LEMON by  doxygen 1.4.4