Grafalgo
Library of useful data structures and algorithms
ppFifo Class Reference

PrePush class encapsulates data and methods used by the FIFO variant of the preflow-push method for computing maximum flows. More...

#include <ppFifo.h>

Inheritance diagram for ppFifo:
Collaboration diagram for ppFifo:

List of all members.

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

Listunbal

Detailed Description

PrePush class encapsulates data and methods used by the FIFO variant of the preflow-push method for computing maximum flows.

Definition at line 21 of file ppFifo.h.


Constructor & Destructor Documentation

ppFifo::ppFifo ( Flograph fg1,
int &  floVal,
bool  batch 
)

Find maximum flow in a flow graph using the fifo varaint 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 ppFifo.cpp.

Here is the call graph for this function:

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.

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 33 of file ppFifo.cpp.

Here is the call graph for this function:


Member Function Documentation

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

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

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

Here is the call graph for this function:

Here is the caller graph for this function:

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.

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

Here is the call graph for this function:


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