src/work/marci/bipartite_matching_try.cc
changeset 762 511200bdb71f
parent 642 e812963087f0
child 768 a5e9303a5511
equal deleted inserted replaced
10:2cccd3ac53a2 11:965b2e0f8715
     6 
     6 
     7 #include <sage_graph.h>
     7 #include <sage_graph.h>
     8 //#include <smart_graph.h>
     8 //#include <smart_graph.h>
     9 //#include <dimacs.h>
     9 //#include <dimacs.h>
    10 #include <hugo/time_measure.h>
    10 #include <hugo/time_measure.h>
    11 #include <hugo/for_each_macros.h>
    11 #include <for_each_macros.h>
    12 #include <bfs_dfs.h>
    12 #include <bfs_dfs.h>
    13 #include <hugo/graph_wrapper.h>
    13 #include <hugo/graph_wrapper.h>
    14 #include <bipartite_graph_wrapper.h>
    14 #include <bipartite_graph_wrapper.h>
    15 #include <hugo/maps.h>
    15 #include <hugo/maps.h>
    16 #include <max_flow.h>
    16 #include <hugo/max_flow.h>
       
    17 #include <augmenting_flow.h>
    17 
    18 
    18 /**
    19 /**
    19  * Inicializalja a veletlenszamgeneratort.
    20  * Inicializalja a veletlenszamgeneratort.
    20  * Figyelem, ez nem jo igazi random szamokhoz,
    21  * Figyelem, ez nem jo igazi random szamokhoz,
    21  * erre ne bizzad a titkaidat!
    22  * erre ne bizzad a titkaidat!
   161 
   162 
   162 
   163 
   163   Timer ts;
   164   Timer ts;
   164   ts.reset();
   165   ts.reset();
   165   stGW::EdgeMap<int> max_flow(stgw);
   166   stGW::EdgeMap<int> max_flow(stgw);
   166   MaxFlow<stGW, int, ConstMap<stGW::Edge, int>, stGW::EdgeMap<int> > 
   167   AugmentingFlow<stGW, int, ConstMap<stGW::Edge, int>, stGW::EdgeMap<int> > 
   167     max_flow_test(stgw, stgw.S_NODE, stgw.T_NODE, const1map, max_flow);
   168     max_flow_test(stgw, stgw.S_NODE, stgw.T_NODE, const1map, max_flow);
   168 //  while (max_flow_test.augmentOnShortestPath()) { }
   169 //  while (max_flow_test.augmentOnShortestPath()) { }
   169   typedef SageGraph MutableGraph;
   170   typedef SageGraph MutableGraph;
   170 //  while (max_flow_test.augmentOnBlockingFlow1<MutableGraph>()) {
   171 //  while (max_flow_test.augmentOnBlockingFlow1<MutableGraph>()) {
   171   while (max_flow_test.augmentOnBlockingFlow2()) {
   172   while (max_flow_test.augmentOnBlockingFlow2()) {