Grafalgo
Library of useful data structures and algorithms
ppHiLab Class Reference

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>

Inheritance diagram for ppHiLab:
Collaboration diagram for ppHiLab:

List of all members.

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
ClistSetunbal

Detailed Description

PpHiLab class encapsulates data and methods used by the highest label-first variant of the preflow-push method for finding maximum flows.

Definition at line 22 of file ppHiLab.h.


Constructor & Destructor Documentation

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.

Parameters:
fg1is a reference to the flow graph
floValis a reference to an integer variable in which the maximum flow value is returned
batchis 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.

Here is the call graph for this function:

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.

Parameters:
fg1is a reference to the flow graph
floValis a reference to an integer variable in which the maximum flow value is returned
batchis a boolean which determines if the algorithm uses batch relabeling (batch=true) or incremental relabeling (batch=false)
statsis a reference to a string in which the statistics information is returned

Definition at line 34 of file ppHiLab.cpp.

Here is the call graph for this function:


Member Function Documentation

void ppHiLab::addUnbal ( vertex  u) [protected]

Add an unbalanced vertex to the vector of lists of such vertices.

Parameters:
uis 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.

Here is the call graph for this function:

Here is the caller graph for this function:

void ppHiLab::doit ( bool  batch) [protected]

Helper method that implements the core algorithm common to the two constructors.

Parameters:
batchis 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.

Here is the call graph for this function:

Here is the caller graph for this function:

vertex ppHiLab::removeUnbal ( ) [protected]

Remove and return an unbalanced vertex with the largest distance label.

Returns:
an unbalanced vertex u that has a maximum distance label; u is also removed from the data structure that tracks unbalanced vertices, so if it remains unbalanced after being processed, it must be added back

Definition at line 117 of file ppHiLab.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Friends