Grafalgo
Library of useful data structures and algorithms
|
PpHiLab class encapsulates data and methods used by the highest label-first variant of the preflow-push method for finding maximum flows. More...
#include <ppHiLab.h>
Public Member Functions | |
ppHiLab (Flograph &, int &, bool) | |
Find maximum flow in a flow graph using the highest-label-first variant of the preflow-push algorithm. | |
ppHiLab (Flograph &, int &, bool, string &) | |
Find maximum flow in a flow graph using the highest-label-first variant of the preflow-push algorithm. | |
Protected Member Functions | |
void | newUnbal (vertex) |
Add a vertex to the vector of lists of unbalanced vertices, if it is not already there. | |
void | addUnbal (vertex) |
Add an unbalanced vertex to the vector of lists of such vertices. | |
vertex | removeUnbal () |
Remove and return an unbalanced vertex with the largest distance label. | |
void | doit (bool) |
Helper method that implements the core algorithm common to the two constructors. | |
Protected Attributes | |
int * | ubVec |
int | top |
ClistSet * | unbal |
PpHiLab class encapsulates data and methods used by the highest label-first variant of the preflow-push method for finding maximum flows.
ppHiLab::ppHiLab | ( | Flograph & | fg1, |
int & | floVal, | ||
bool | batch | ||
) |
Find maximum flow in a flow graph using the highest-label-first variant 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 ppHiLab.cpp.
ppHiLab::ppHiLab | ( | Flograph & | fg1, |
int & | floVal, | ||
bool | batch, | ||
string & | stats | ||
) |
Find maximum flow in a flow graph using the highest-label-first variant 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 34 of file ppHiLab.cpp.
void ppHiLab::addUnbal | ( | vertex | u | ) | [protected] |
Add an unbalanced vertex to the vector of lists of such vertices.
u | is the unbalanced vertex to be added to the list of of unbalanced vertices with the same distance label as u |
Definition at line 105 of file ppHiLab.cpp.
void ppHiLab::doit | ( | bool | batch | ) | [protected] |
Helper method that implements the core algorithm common to the two constructors.
batch | is a boolean which determines if the algorithm uses batch relabeling (batch=true) or incremental relabeling (batch=false) |
Definition at line 48 of file ppHiLab.cpp.
vertex ppHiLab::removeUnbal | ( | ) | [protected] |
Remove and return an unbalanced vertex with the largest distance label.
Definition at line 117 of file ppHiLab.cpp.