andres::graph
|
Push-Relabel Algorithm for computing the maximum s-t-flow of a Digraph. More...
#include <max-flow.hxx>
Public Types | |
typedef GRAPH | GraphType |
typedef FLOW | Flow |
typedef GraphType::VertexIterator | VertexIterator |
typedef GraphType::EdgeIterator | EdgeIterator |
typedef GraphType::AdjacencyIterator | AdjacencyIterator |
Public Member Functions | |
MaxFlowPushRelabel () | |
Construct an instance of the push-relabel algorithm. | |
void | clear () |
Clear all members. | |
Flow | maxFlow () const |
Return the maximum flow through the graph. | |
Flow | flow (const std::size_t) const |
Return the flow in a certain edge. | |
std::size_t | numberOfPushes () const |
Return the total number of pushes executed. | |
std::size_t | numberOfRelabels () const |
Return the total number of relabels executed. | |
template<class EDGE_WEIGHT_ITERATOR > | |
MaxFlowPushRelabel (const GraphType &, EDGE_WEIGHT_ITERATOR, const std::size_t, const std::size_t) | |
Construct an instance of the push-relabel algorithm. | |
template<class EDGE_WEIGHT_ITERATOR , class SUBGRAPH_MASK > | |
MaxFlowPushRelabel (const GraphType &, const SUBGRAPH_MASK &, EDGE_WEIGHT_ITERATOR, const std::size_t, const std::size_t) | |
Construct an instance of the push-relabel algorithm. | |
template<class EDGE_WEIGHT_ITERATOR , class SUBGRAPH_MASK > | |
Flow | operator() (const GraphType &, const SUBGRAPH_MASK &, EDGE_WEIGHT_ITERATOR, const std::size_t, const std::size_t) |
Initialize members and execute push-relabel algorithm. |
Push-Relabel Algorithm for computing the maximum s-t-flow of a Digraph.
With FIFO vertex selection rule.
Reference: A. V. Goldberg and R. E. Tarjan. A new approach to the maximum-flow problem. Journal of the ACM 35(4):921-940. 1988
Definition at line 28 of file max-flow.hxx.
typedef GraphType::AdjacencyIterator andres::graph::MaxFlowPushRelabel< GRAPH, FLOW >::AdjacencyIterator |
Definition at line 34 of file max-flow.hxx.
typedef GraphType::EdgeIterator andres::graph::MaxFlowPushRelabel< GRAPH, FLOW >::EdgeIterator |
Definition at line 33 of file max-flow.hxx.
typedef FLOW andres::graph::MaxFlowPushRelabel< GRAPH, FLOW >::Flow |
Definition at line 31 of file max-flow.hxx.
typedef GRAPH andres::graph::MaxFlowPushRelabel< GRAPH, FLOW >::GraphType |
Definition at line 30 of file max-flow.hxx.
typedef GraphType::VertexIterator andres::graph::MaxFlowPushRelabel< GRAPH, FLOW >::VertexIterator |
Definition at line 32 of file max-flow.hxx.
|
inline |
Construct an instance of the push-relabel algorithm.
Definition at line 76 of file max-flow.hxx.
|
inline |
Construct an instance of the push-relabel algorithm.
graph | A graph. |
edgeWeightIterator | Iterator to the beginning of a sequence of edge weights. |
sourceVertexIndex | Index of the source vertex. |
sinkVertexIndex | Index of the sink vertex. |
Definition at line 99 of file max-flow.hxx.
|
inline |
Construct an instance of the push-relabel algorithm.
graph | A graph. |
mask | A subgraph mask. |
edgeWeightIterator | Iterator to the beginning of a sequence of edge weights. |
sourceVertexIndex | Index of the source vertex. |
sinkVertexIndex | Index of the sink vertex. |
Definition at line 130 of file max-flow.hxx.
|
inline |
Clear all members.
Definition at line 155 of file max-flow.hxx.
|
inline |
Return the flow in a certain edge.
edgeIndex | Index of an edge. |
Definition at line 186 of file max-flow.hxx.
|
inline |
Return the maximum flow through the graph.
Definition at line 175 of file max-flow.hxx.
|
inline |
Return the total number of pushes executed.
Definition at line 199 of file max-flow.hxx.
|
inline |
Return the total number of relabels executed.
Definition at line 209 of file max-flow.hxx.
|
inline |
Initialize members and execute push-relabel algorithm.
graph | A graph. |
mask | A subgraph mask. |
edgeWeightIterator | Iterator to the beginning of a sequence of edge weights. |
sourceVertexIndex | Index of the source vertex. |
sinkVertexIndex | Index of the sink vertex. |
Definition at line 224 of file max-flow.hxx.