diff -r 58243a389464 -r 511200bdb71f src/work/marci/lg_vs_sg_vs_sg.cc --- a/src/work/marci/lg_vs_sg_vs_sg.cc Tue Aug 17 10:24:19 2004 +0000 +++ b/src/work/marci/lg_vs_sg_vs_sg.cc Tue Aug 17 11:20:16 2004 +0000 @@ -7,9 +7,10 @@ #include #include #include -#include +#include +#include #include -#include +#include using namespace hugo; @@ -37,6 +38,8 @@ Graph::EdgeMap flow(g); //0 flow MaxFlow, Graph::EdgeMap > max_flow_test(g, s, t, cap, flow/*, true*/); + AugmentingFlow, Graph::EdgeMap > + augmenting_flow_test(g, s, t, cap, flow/*, true*/); std::cout << "SageGraph ..." << std::endl; @@ -53,10 +56,10 @@ FOR_EACH_LOC(Graph::EdgeIt, e, g) flow.set(e, 0); ts.reset(); int i=0; - while (max_flow_test.augmentOnBlockingFlow()) { ++i; } + while (augmenting_flow_test.augmentOnBlockingFlow()) { ++i; } std::cout << "elapsed time: " << ts << std::endl; std::cout << "number of augmentation phases: " << i << std::endl; - std::cout << "flow value: "<< max_flow_test.flowValue() << std::endl; + std::cout << "flow value: "<< augmenting_flow_test.flowValue() << std::endl; } // { @@ -75,10 +78,10 @@ FOR_EACH_LOC(Graph::EdgeIt, e, g) flow.set(e, 0); ts.reset(); int i=0; - while (max_flow_test.augmentOnBlockingFlow2()) { ++i; } + while (augmenting_flow_test.augmentOnBlockingFlow2()) { ++i; } std::cout << "elapsed time: " << ts << std::endl; std::cout << "number of augmentation phases: " << i << std::endl; - std::cout << "flow value: "<< max_flow_test.flowValue() << std::endl; + std::cout << "flow value: "<< augmenting_flow_test.flowValue() << std::endl; } { @@ -86,10 +89,10 @@ FOR_EACH_LOC(Graph::EdgeIt, e, g) flow.set(e, 0); ts.reset(); int i=0; - while (max_flow_test.augmentOnShortestPath()) { ++i; } + while (augmenting_flow_test.augmentOnShortestPath()) { ++i; } std::cout << "elapsed time: " << ts << std::endl; std::cout << "number of augmentation phases: " << i << std::endl; - std::cout << "flow value: "<< max_flow_test.flowValue() << std::endl; + std::cout << "flow value: "<< augmenting_flow_test.flowValue() << std::endl; } } @@ -109,6 +112,8 @@ Graph::EdgeMap flow(g); //0 flow MaxFlow, Graph::EdgeMap > max_flow_test(g, s, t, cap, flow/*, true*/); + AugmentingFlow, Graph::EdgeMap > + augmenting_flow_test(g, s, t, cap, flow/*, true*/); // MaxFlow, Graph::EdgeMap > // max_flow_test(g, s, t, cap, flow); @@ -128,10 +133,10 @@ FOR_EACH_LOC(Graph::EdgeIt, e, g) flow.set(e, 0); ts.reset(); int i=0; - while (max_flow_test.augmentOnBlockingFlow()) { ++i; } + while (augmenting_flow_test.augmentOnBlockingFlow()) { ++i; } std::cout << "elapsed time: " << ts << std::endl; std::cout << "number of augmentation phases: " << i << std::endl; - std::cout << "flow value: "<< max_flow_test.flowValue() << std::endl; + std::cout << "flow value: "<< augmenting_flow_test.flowValue() << std::endl; } // { @@ -150,10 +155,10 @@ FOR_EACH_LOC(Graph::EdgeIt, e, g) flow.set(e, 0); ts.reset(); int i=0; - while (max_flow_test.augmentOnBlockingFlow2()) { ++i; } + while (augmenting_flow_test.augmentOnBlockingFlow2()) { ++i; } std::cout << "elapsed time: " << ts << std::endl; std::cout << "number of augmentation phases: " << i << std::endl; - std::cout << "flow value: "<< max_flow_test.flowValue() << std::endl; + std::cout << "flow value: "<< augmenting_flow_test.flowValue() << std::endl; } { @@ -161,10 +166,10 @@ FOR_EACH_LOC(Graph::EdgeIt, e, g) flow.set(e, 0); ts.reset(); int i=0; - while (max_flow_test.augmentOnShortestPath()) { ++i; } + while (augmenting_flow_test.augmentOnShortestPath()) { ++i; } std::cout << "elapsed time: " << ts << std::endl; std::cout << "number of augmentation phases: " << i << std::endl; - std::cout << "flow value: "<< max_flow_test.flowValue() << std::endl; + std::cout << "flow value: "<< augmenting_flow_test.flowValue() << std::endl; } } @@ -184,6 +189,8 @@ Graph::EdgeMap flow(g); //0 flow MaxFlow, Graph::EdgeMap > max_flow_test(g, s, t, cap, flow/*, true*/); + AugmentingFlow, Graph::EdgeMap > + augmenting_flow_test(g, s, t, cap, flow/*, true*/); // MaxFlow, Graph::EdgeMap > // max_flow_test(g, s, t, cap, flow); @@ -203,10 +210,10 @@ FOR_EACH_LOC(Graph::EdgeIt, e, g) flow.set(e, 0); ts.reset(); int i=0; - while (max_flow_test.augmentOnBlockingFlow()) { ++i; } + while (augmenting_flow_test.augmentOnBlockingFlow()) { ++i; } std::cout << "elapsed time: " << ts << std::endl; std::cout << "number of augmentation phases: " << i << std::endl; - std::cout << "flow value: "<< max_flow_test.flowValue() << std::endl; + std::cout << "flow value: "<< augmenting_flow_test.flowValue() << std::endl; } // { @@ -225,10 +232,10 @@ FOR_EACH_LOC(Graph::EdgeIt, e, g) flow.set(e, 0); ts.reset(); int i=0; - while (max_flow_test.augmentOnBlockingFlow2()) { ++i; } + while (augmenting_flow_test.augmentOnBlockingFlow2()) { ++i; } std::cout << "elapsed time: " << ts << std::endl; std::cout << "number of augmentation phases: " << i << std::endl; - std::cout << "flow value: "<< max_flow_test.flowValue() << std::endl; + std::cout << "flow value: "<< augmenting_flow_test.flowValue() << std::endl; } { @@ -236,15 +243,12 @@ FOR_EACH_LOC(Graph::EdgeIt, e, g) flow.set(e, 0); ts.reset(); int i=0; - while (max_flow_test.augmentOnShortestPath()) { ++i; } + while (augmenting_flow_test.augmentOnShortestPath()) { ++i; } std::cout << "elapsed time: " << ts << std::endl; std::cout << "number of augmentation phases: " << i << std::endl; - std::cout << "flow value: "<< max_flow_test.flowValue() << std::endl; + std::cout << "flow value: "<< augmenting_flow_test.flowValue() << std::endl; } } - - - return 0; }