Grafalgo
Library of useful data structures and algorithms
|
00001 00005 #ifndef MINCAP_H 00006 #define MINCAP_H 00007 00008 #include "stdinc.h" 00009 #include "Mflograph.h" 00010 #include "List.h" 00011 #include "Dheap.h" 00012 00013 using namespace grafalgo; 00014 00015 class minFlow { 00016 public: 00017 minFlow(Mflograph&,int&); 00018 ~minFlow(); 00019 protected: 00020 Mflograph* fg; // graph we're finding flow on 00021 edge *pEdge; // pEdge[u] is edge to parent of u in the 00022 // spt constructed by findPath or findCycle 00023 00024 bool findPath(); // find augenting path 00025 int augment(); // add flow to augmenting path 00026 bool findCycle(edge); // find cycle 00027 int add2cycle(edge); // add flow to augmenting path 00028 }; 00029 00030 #endif