src/work/marci/bipartite_graph_wrapper_test.cc
changeset 764 615aca7091d2
parent 642 e812963087f0
child 768 a5e9303a5511
equal deleted inserted replaced
12:45706c41ed07 13:efff332595f4
     5 
     5 
     6 #include <sage_graph.h>
     6 #include <sage_graph.h>
     7 //#include <smart_graph.h>
     7 //#include <smart_graph.h>
     8 //#include <dimacs.h>
     8 //#include <dimacs.h>
     9 #include <hugo/time_measure.h>
     9 #include <hugo/time_measure.h>
    10 #include <hugo/for_each_macros.h>
    10 #include <for_each_macros.h>
    11 #include <bfs_dfs.h>
    11 #include <bfs_dfs.h>
    12 #include <hugo/graph_wrapper.h>
    12 #include <hugo/graph_wrapper.h>
    13 #include <bipartite_graph_wrapper.h>
    13 #include <bipartite_graph_wrapper.h>
    14 #include <hugo/maps.h>
    14 #include <hugo/maps.h>
    15 #include <max_flow.h>
    15 #include <hugo/max_flow.h>
       
    16 #include <augmenting_flow.h>
    16 
    17 
    17 using namespace hugo;
    18 using namespace hugo;
    18 
    19 
    19 int main() {
    20 int main() {
    20   typedef UndirSageGraph Graph; 
    21   typedef UndirSageGraph Graph; 
   131   while (!bfs_stgw.finished()) { 
   132   while (!bfs_stgw.finished()) { 
   132     std::cout << " " << stGW::OutEdgeIt(bfs_stgw) << "\n";
   133     std::cout << " " << stGW::OutEdgeIt(bfs_stgw) << "\n";
   133     ++bfs_stgw; 
   134     ++bfs_stgw; 
   134   }
   135   }
   135   
   136   
   136   MaxFlow<stGW, int, ConstMap<stGW::Edge, int>, stGW::EdgeMap<int> > 
   137   AugmentingFlow<stGW, int, ConstMap<stGW::Edge, int>, stGW::EdgeMap<int> > 
   137     max_flow_test(stgw, stgw.S_NODE, stgw.T_NODE, const1map, flow);
   138     max_flow_test(stgw, stgw.S_NODE, stgw.T_NODE, const1map, flow);
   138   while (max_flow_test.augmentOnShortestPath()) { }
   139   while (max_flow_test.augmentOnShortestPath()) { }
   139 
   140 
   140   std::cout << max_flow_test.flowValue() << std::endl;
   141   std::cout << max_flow_test.flowValue() << std::endl;
   141 
   142