src/work/marci/max_flow_1.cc
changeset 639 a11a4377a816
parent 615 b6b31b75b522
child 640 d426dca0aaf7
equal deleted inserted replaced
0:8532a80124b3 1:996b1777df40
    39 
    39 
    40   {
    40   {
    41     std::cout << "preflow ..." << std::endl;
    41     std::cout << "preflow ..." << std::endl;
    42     FOR_EACH_LOC(Graph::EdgeIt, e, g) flow.set(e, 0);
    42     FOR_EACH_LOC(Graph::EdgeIt, e, g) flow.set(e, 0);
    43     ts.reset();
    43     ts.reset();
    44     max_flow_test.preflowPhase0(MaxFlow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> >::ZERO_FLOW);
    44     max_flow_test.preflowPhase1(MaxFlow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> >::ZERO_FLOW);
    45     std::cout << "elapsed time: " << ts << std::endl;
    45     std::cout << "elapsed time: " << ts << std::endl;
    46     std::cout << "flow value: "<< max_flow_test.flowValue() << std::endl;
    46     std::cout << "flow value: "<< max_flow_test.flowValue() << std::endl;
    47   }
    47   }
    48 
    48 
    49   {
    49   {
    50     std::cout << "preflow ..." << std::endl;
    50     std::cout << "preflow ..." << std::endl;
    51     FOR_EACH_LOC(Graph::EdgeIt, e, g) flow.set(e, 0);
    51     FOR_EACH_LOC(Graph::EdgeIt, e, g) flow.set(e, 0);
    52     ts.reset();
    52     ts.reset();
    53     max_flow_test.preflowPhase0(MaxFlow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> >::ZERO_FLOW);
    53     max_flow_test.preflowPhase1(MaxFlow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> >::ZERO_FLOW);
    54     std::cout << "elapsed time: " << ts << std::endl;
    54     std::cout << "elapsed time: " << ts << std::endl;
    55     std::cout << "flow value: "<< max_flow_test.flowValue() << std::endl;
    55     std::cout << "flow value: "<< max_flow_test.flowValue() << std::endl;
    56   }
    56   }
    57 
    57 
    58 
    58