Grafalgo
Library of useful data structures and algorithms
/Users/jst/src/grafalgo/cpp/include/prePush.h
Go to the documentation of this file.
00001 
00009 // prePush class. Encapsulates data and routines used by the preflow-push
00010 // algorithms for max flow. Users invoke the algorithm using the constructor
00011 // with optional arguments to select different variants.
00012 
00013 #ifndef PREPUSHC_H
00014 #define PREPUSHC_H
00015 
00016 #include "stdinc.h"
00017 #include "Flograph.h"
00018 #include "List.h"
00019 
00020 using namespace grafalgo;
00021 
00027 class prePush {
00028 public: 
00029                 prePush(Flograph&, int&);
00030                 ~prePush();
00031 protected:
00032         Flograph* fg;           
00033         int     *d;             
00034         int     *excess;        
00035         edge    *nextedge;      
00036 
00037         // statistics counters
00038         int     satCount;       
00039         int     nonSatCount;    
00040         int     newDistCount;   
00041         int     relabCount;     
00042 
00043         bool    balance(vertex);
00044         void    initdist(); 
00045         int     minlabel(vertex);
00046         void    virtual newUnbal(vertex); 
00047         int     flowValue();    
00048 };
00049 
00050 #endif
 All Classes Files Functions Variables Typedefs Friends