Grafalgo
Library of useful data structures and algorithms
/Users/jst/src/grafalgo/cpp/include/cycRed.h
00001 // cycRed class encapsulate data and routines used by cycle reduction
00002 // algorithm for min cost flow. Users invoke algorithm with constructor.
00003 
00004 #ifndef CYCRED_H
00005 #define CYCRED_H
00006 
00007 #include "stdinc.h"
00008 #include "Wflograph.h"
00009 #include "List.h"
00010 #include "PathSet.h"
00011 #include "Dtrees.h"
00012 #include "dinicDtrees.h"
00013 
00014 using namespace grafalgo;
00015 
00016 class cycRed {
00017 public:         
00018                 cycRed(Wflograph&,flow&,cost&);
00019 private:
00020         Wflograph* wfg;         // graph we're finding flow on
00021         edge*   pEdge;          // pEdge[u] is edge to parent of u in spt
00022         int*    mark;           // used by cycleCheck
00023 
00024         void augment(vertex);   // add flow to a cycle
00025         vertex findCyc();       // find negative cost cycle
00026         vertex cycleCheck();    // check for cycle in pEdge pointers
00027 };
00028 
00029 #endif
 All Classes Files Functions Variables Typedefs Friends