1.1 --- a/src/work/marci/edmonds_karp_demo.cc Thu Apr 22 15:58:08 2004 +0000
1.2 +++ b/src/work/marci/edmonds_karp_demo.cc Thu Apr 22 16:07:17 2004 +0000
1.3 @@ -9,6 +9,7 @@
1.4 #include <time_measure.h>
1.5 //#include <graph_wrapper.h>
1.6 #include <preflow.h>
1.7 +#include <preflowproba.h>
1.8 #include <for_each_macros.h>
1.9
1.10 using namespace hugo;
1.11 @@ -70,7 +71,9 @@
1.12 Timer ts;
1.13 Graph::EdgeMap<int> flow(G); //0 flow
1.14 Preflow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> >
1.15 - pre_flow_test(G, s, t, cap, flow);
1.16 + pre_flow_test(G, s, t, cap, flow, true);
1.17 + PreflowProba<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> >
1.18 + pre_flow_proba(G, s, t, cap, flow, true, true);
1.19 MaxFlow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> >
1.20 max_flow_test(G, s, t, cap, flow);
1.21
1.22 @@ -83,6 +86,15 @@
1.23 }
1.24
1.25 {
1.26 + std::cout << "wrapped preflow ..." << std::endl;
1.27 + FOR_EACH_LOC(Graph::EdgeIt, e, G) flow.set(e, 0);
1.28 + ts.reset();
1.29 + pre_flow_proba.run();
1.30 + std::cout << "elapsed time: " << ts << std::endl;
1.31 + std::cout << "flow value: "<< pre_flow_test.flowValue() << std::endl;
1.32 + }
1.33 +
1.34 + {
1.35 std::cout << "physical blocking flow augmentation ..." << std::endl;
1.36 FOR_EACH_LOC(Graph::EdgeIt, e, G) flow.set(e, 0);
1.37 ts.reset();