[Lemon-commits] [lemon_svn] marci: r192 - hugo/trunk/src/work/marci
Lemon SVN
svn at lemon.cs.elte.hu
Mon Nov 6 20:38:02 CET 2006
Author: marci
Date: Mon Mar 1 13:06:56 2004
New Revision: 192
Modified:
hugo/trunk/src/work/marci/edmonds_karp_demo.cc
Log:
.
Modified: hugo/trunk/src/work/marci/edmonds_karp_demo.cc
==============================================================================
--- hugo/trunk/src/work/marci/edmonds_karp_demo.cc (original)
+++ hugo/trunk/src/work/marci/edmonds_karp_demo.cc Mon Mar 1 13:06:56 2004
@@ -26,7 +26,8 @@
double pre_time=currTime();
MaxFlow<ListGraph, int, ListGraph::EdgeMap<int>, ListGraph::EdgeMap<int> > max_flow_test(G, s, t, flow, cap);
//max_flow_test.augmentWithBlockingFlow<ListGraph>();
- max_flow_test.run<ListGraph>();
+ int i=0;
+ while (max_flow_test.augmentOnBlockingFlow<ListGraph>()) { ++i; }
double post_time=currTime();
//std::cout << "maximum flow: "<< std::endl;
@@ -35,6 +36,7 @@
//}
//std::cout<<std::endl;
std::cout << "elapsed time: " << post_time-pre_time << " sec"<< std::endl;
+ std::cout << "number of augmentation phases: " << i << std::endl;
std::cout << "flow value: "<< max_flow_test.flowValue() << std::endl;
}
@@ -45,7 +47,8 @@
double pre_time=currTime();
MaxFlow<ListGraph, int, ListGraph::EdgeMap<int>, ListGraph::EdgeMap<int> > max_flow_test(G, s, t, flow, cap);
//max_flow_test.augmentWithBlockingFlow<ListGraph>();
- max_flow_test.run();
+ int i=0;
+ while (max_flow_test.augmentOnShortestPath()) { ++i; }
double post_time=currTime();
//std::cout << "maximum flow: "<< std::endl;
@@ -54,6 +57,7 @@
//}
//std::cout<<std::endl;
std::cout << "elapsed time: " << post_time-pre_time << " sec"<< std::endl;
+ std::cout << "number of augmentation phases: " << i << std::endl;
std::cout << "flow value: "<< max_flow_test.flowValue() << std::endl;
}
More information about the Lemon-commits
mailing list