be a directed graph and let
be a number type. Let moreover
, be functions on the edge-set.
In the appications of ResGraphAdaptor,
usually stands for a flow and
for a capacity function. Suppose that a graph instange g of type ListGraph implements
.
ListGraph g;
Then ResGraphAdaptor implements the graph structure with node-set
and edge-set
, where
and
, i.e. the so called residual graph. When we take the union
, multilicities are counted, i.e. if an edge is in both
and
, 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> > ga(g);
#include <lemon/graph_adaptor.h>

Classes | |
| class | ResCap |
| Residual capacity map. More... | |
Public Member Functions | |
| ResGraphAdaptor (const Graph &_graph, const CapacityMap &_capacity, FlowMap &_flow, const Tol &_tolerance=Tol()) | |
| Constructor of the residual graph. | |
| Number | rescap (const Edge &edge) const |
| void | augment (const Edge &e, Number a) const |
| Augment on the given edge in the residual graph. | |
Static Public Member Functions | |
| static bool | forward (const Edge &e) |
| Returns the direction of the edge. | |
| static bool | backward (const Edge &e) |
| Returns the direction of the edge. | |
| static Edge | forward (const typename Graph::Edge &e) |
| static Edge | backward (const typename Graph::Edge &e) |
| ResGraphAdaptor | ( | const Graph & | _graph, | |
| const CapacityMap & | _capacity, | |||
| FlowMap & | _flow, | |||
| const Tol & | _tolerance = Tol() | |||
| ) | [inline] |
Constructor of the residual graph. The parameters are the graph type, the flow map, the capacity map and a tolerance object.
| Number rescap | ( | const Edge & | edge | ) | const [inline] |
Gives back the residual capacity of the edge.
| void augment | ( | const Edge & | e, | |
| Number | a | |||
| ) | const [inline] |
Augment on the given edge in the residual graph. It increase or decrease the flow on the original edge depend on the direction of the residual edge.
| static bool forward | ( | const Edge & | e | ) | [inline, static] |
Returns true when the edge is same oriented as the original edge.
| static bool backward | ( | const Edge & | e | ) | [inline, static] |
Returns true when the edge is opposite oriented as the original edge.
| static Edge forward | ( | const typename Graph::Edge & | e | ) | [inline, static] |
Gives back the forward oriented residual edge.
| static Edge backward | ( | const typename Graph::Edge & | e | ) | [inline, static] |
Gives back the backward oriented residual edge.
1.5.9