Index: src/work/marci/leda/bipartite_matching_leda_gen.cc
===================================================================
--- src/work/marci/leda/bipartite_matching_leda_gen.cc	(revision 459)
+++ src/work/marci/leda/bipartite_matching_leda_gen.cc	(revision 482)
@@ -16,9 +16,7 @@
 #include <time_measure.h>
 #include <for_each_macros.h>
-//#include <bfs_iterator.h>
 #include <graph_wrapper.h>
 #include <maps.h>
-#include <edmonds_karp.h>
-#include <preflow.h>
+#include <max_flow.h>
 
 /**
@@ -79,32 +77,24 @@
   std::cout << "number of groups in LEDA random group graph=";
   std::cin >> k; 
-
+  std::cout << std::endl;
+  
   leda_list<leda_node> lS;
   leda_list<leda_node> lT;
   random_bigraph(lg, a, b, m, lS, lT, k);
 
-//   for (int i=0; i<a; ++i) s_nodes.push_back(g.addNode());
-//   for (int i=0; i<b; ++i) t_nodes.push_back(g.addNode());
+  Graph::NodeMap<int> ref_map(g, -1);
+  IterableBoolMap< Graph::NodeMap<int> > bipartite_map(ref_map);
 
-//   random_init();
-//   for(int i=0; i<m; ++i) {
-//     g.addEdge(s_nodes[random(a)], t_nodes[random(b)]);
-//   }
-
-  Graph::NodeMap<int> ref_map(g, -1);
-
-  IterableBoolMap< Graph::NodeMap<int> > bipartite_map(ref_map);
-//   for (int i=0; i<a; ++i) bipartite_map.insert(s_nodes[i], false);
-//   for (int i=0; i<b; ++i) bipartite_map.insert(t_nodes[i], true);
+  //generating leda random group graph
   leda_node ln;
   forall(ln, lS) bipartite_map.insert(ln, false);
   forall(ln, lT) bipartite_map.insert(ln, true);
 
+  //making bipartite graph
   typedef BipartiteGraphWrapper<Graph> BGW;
   BGW bgw(g, bipartite_map);
 
-  //  BGW::NodeMap<int> dbyj(bgw);
-  //  BGW::EdgeMap<int> dbyxcj(bgw);
 
+  //st-wrapper
   typedef stGraphWrapper<BGW> stGW;
   stGW stgw(bgw);
@@ -113,46 +103,31 @@
 
   Timer ts;
+
+  ts.reset();
   FOR_EACH_LOC(stGW::EdgeIt, e, stgw) flow.set(e, 0);
-  ts.reset();
-  //  stGW::EdgeMap<int> pre_flow(stgw);
-  Preflow<stGW, int, ConstMap<stGW::Edge, int>, stGW::EdgeMap<int> > 
-    pre_flow_test(stgw, stgw.S_NODE, stgw.T_NODE, const1map, flow/*, true*/);
-  pre_flow_test.run();
-  std::cout << "HUGO pre flow value: " << pre_flow_test.flowValue() << std::endl;
-  std::cout << "elapsed time: " << ts << std::endl;
-//   FOR_EACH_LOC(stGW::EdgeIt, e, stgw) { 
-//     std::cout << e << ": " << pre_flow[e] << "\n"; 
-//   }
-  std::cout << "\n";
+  MaxFlow<stGW, int, ConstMap<stGW::Edge, int>, stGW::EdgeMap<int> > 
+    max_flow_test(stgw, stgw.S_NODE, stgw.T_NODE, const1map, flow/*, true*/);
+  max_flow_test.run();
+  std::cout << "HUGO max matching algorithm based on preflow." << std::endl 
+	    << "Size of matching: " 
+	    << max_flow_test.flowValue() << std::endl;
+  std::cout << "elapsed time: " << ts << std::endl << std::endl;
 
   ts.reset();  
   leda_list<leda_edge> ml=MAX_CARD_BIPARTITE_MATCHING(lg);
-  //  stGW::EdgeMap<int> pre_flow(stgw);
-  //Preflow<stGW, int, ConstMap<stGW::Edge, int>, stGW::EdgeMap<int> > 
-  //  pre_flow_test(stgw, stgw.S_NODE, stgw.T_NODE, const1map, pre_flow, true);
-  //pre_flow_test.run();
-  std::cout << "LEDA matching value: " << ml.size() << std::endl;
+  std::cout << "LEDA max matching algorithm." << std::endl 
+	    << "Size of matching: " 
+	    << ml.size() << std::endl;
   std::cout << "elapsed time: " << ts << std::endl;
-//   FOR_EACH_LOC(stGW::EdgeIt, e, stgw) { 
-//     std::cout << e << ": " << pre_flow[e] << "\n"; 
-//   }
   std::cout << "\n";
 
+  ts.reset();
   FOR_EACH_LOC(stGW::EdgeIt, e, stgw) flow.set(e, 0);
-  ts.reset();
-  MaxFlow<stGW, int, ConstMap<stGW::Edge, int>, stGW::EdgeMap<int> > 
-    max_flow_test(stgw, stgw.S_NODE, stgw.T_NODE, const1map, flow);
-//  while (max_flow_test.augmentOnShortestPath()) { }
   typedef ListGraph MutableGraph;
-//  while (max_flow_test.augmentOnBlockingFlow1<MutableGraph>()) {
-  while (max_flow_test.augmentOnBlockingFlow2()) {
-   std::cout << max_flow_test.flowValue() << std::endl;
-  }
-  std::cout << "HUGO blocking flow value: " << max_flow_test.flowValue() << std::endl;
+  while (max_flow_test.augmentOnBlockingFlow<MutableGraph>()) { }
+  std::cout << "HUGO max matching algorithm based on blocking flow augmentation." 
+	    << std::endl << "Matching size: " 
+	    << max_flow_test.flowValue() << std::endl;
   std::cout << "elapsed time: " << ts << std::endl;
-//   FOR_EACH_LOC(stGW::EdgeIt, e, stgw) { 
-//     std::cout << e << ": " << max_flow[e] << "\n"; 
-//   }
-//   std::cout << "\n";
 
   return 0;
