Grafalgo
Library of useful data structures and algorithms
|
PrePush class encapsulates data and methods used by the FIFO variant of the preflow-push method for computing maximum flows. More...
#include <ppFifo.h>
Public Member Functions | |
ppFifo (Flograph &, int &, bool) | |
Find maximum flow in a flow graph using the fifo varaint of the preflow-push algorithm. | |
ppFifo (Flograph &, int &, bool, string &) | |
Find maximum flow in a flow graph using the fifo varaint of the preflow-push algorithm. | |
Protected Member Functions | |
void | doit (bool) |
Helper method that implements the core algorithm common two the two different constructors. | |
void | newUnbal (vertex) |
Add a vertex to the set of unbalanced vertices. | |
Protected Attributes | |
List * | unbal |
PrePush class encapsulates data and methods used by the FIFO variant of the preflow-push method for computing maximum flows.
ppFifo::ppFifo | ( | Flograph & | fg1, |
int & | floVal, | ||
bool | batch | ||
) |
Find maximum flow in a flow graph using the fifo varaint of the preflow-push algorithm.
fg1 | is a reference to the flow graph |
floVal | is a reference to an integer variable in which the maximum flow value is returned |
batch | is a boolean which determines if the algorithm uses batch relabeling (batch=true) or incremental relabeling (batch=false) |
Definition at line 19 of file ppFifo.cpp.
ppFifo::ppFifo | ( | Flograph & | fg1, |
int & | floVal, | ||
bool | batch, | ||
string & | stats | ||
) |
Find maximum flow in a flow graph using the fifo varaint of the preflow-push algorithm.
fg1 | is a reference to the flow graph |
floVal | is a reference to an integer variable in which the maximum flow value is returned |
batch | is a boolean which determines if the algorithm uses batch relabeling (batch=true) or incremental relabeling (batch=false) |
stats | is a reference to a string in which the statistics information is returned |
Definition at line 33 of file ppFifo.cpp.
void ppFifo::doit | ( | bool | batch | ) | [protected] |
Helper method that implements the core algorithm common two the two different constructors.
batch | is a boolean which determines if the algorithm uses batch relabeling (batch=true) or incremental relabeling (batch=false) |
Definition at line 47 of file ppFifo.cpp.
void ppFifo::newUnbal | ( | vertex | u | ) | [protected, virtual] |
Add a vertex to the set of unbalanced vertices.
This method is called from the balance method within the base class.
u | is a vertex that that is unbalanced; u may have been unbalanced previously as well |
Reimplemented from prePush.
Definition at line 90 of file ppFifo.cpp.