misc
authormarci
Mon, 26 Apr 2004 16:02:09 +0000
changeset 41832a2a16027e0
parent 417 4ce3d5f675ea
child 419 69e961722628
misc
src/work/marci/edmonds_karp_demo.cc
     1.1 --- a/src/work/marci/edmonds_karp_demo.cc	Mon Apr 26 15:14:23 2004 +0000
     1.2 +++ b/src/work/marci/edmonds_karp_demo.cc	Mon Apr 26 16:02:09 2004 +0000
     1.3 @@ -72,6 +72,8 @@
     1.4    Graph::EdgeMap<int> flow(G); //0 flow
     1.5    Preflow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> > 
     1.6      pre_flow_test(G, s, t, cap, flow, true);
     1.7 +  Preflow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> > 
     1.8 +    pre_flow_ize(G, s, t, cap, flow, false);
     1.9    PreflowRes<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> > 
    1.10      pre_flow_res(G, s, t, cap, flow, true);
    1.11    MaxFlow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> > 
    1.12 @@ -86,6 +88,15 @@
    1.13    }
    1.14  
    1.15    {
    1.16 +    std::cout << "preflow ..." << std::endl;
    1.17 +    FOR_EACH_LOC(Graph::EdgeIt, e, G) flow.set(e, 0);
    1.18 +    ts.reset();
    1.19 +    pre_flow_ize.run();
    1.20 +    std::cout << "elapsed time: " << ts << std::endl;
    1.21 +    std::cout << "flow value: "<< pre_flow_ize.flowValue() << std::endl;
    1.22 +  }
    1.23 +
    1.24 +  {
    1.25      std::cout << "wrapped preflow ..." << std::endl;
    1.26      FOR_EACH_LOC(Graph::EdgeIt, e, G) flow.set(e, 0);
    1.27      ts.reset();