src/work/jacint/preflow.cc
changeset 113 cf7b01232d86
parent 109 fc5982b39e10
child 211 9222a9b8b323
     1.1 --- a/src/work/jacint/preflow.cc	Sun Feb 22 11:45:38 2004 +0000
     1.2 +++ b/src/work/jacint/preflow.cc	Sun Feb 22 12:17:16 2004 +0000
     1.3 @@ -30,8 +30,10 @@
     1.4      if ( mintime > post_time-pre_time ) mintime = post_time-pre_time;
     1.5    }
     1.6  
     1.7 -  preflow<ListGraph, int> max_flow_test(G, s, t, cap);
     1.8 -  
     1.9 +  double pre_time=currTime();
    1.10 +    preflow<ListGraph, int> max_flow_test(G, s, t, cap);
    1.11 +  double post_time=currTime();
    1.12 +    
    1.13    ListGraph::NodeMap<bool> cut(G);
    1.14    max_flow_test.minCut(cut); 
    1.15    int min_cut_value=0;
    1.16 @@ -56,6 +58,10 @@
    1.17        }
    1.18    
    1.19    std::cout << "min time of 10 runs: " << mintime << " sec"<< std::endl; 
    1.20 +  std::cout << "phase 0: " << max_flow_test.time-pre_time 
    1.21 +	    << " sec"<< std::endl; 
    1.22 +  std::cout << "phase 1: " << post_time-max_flow_test.time 
    1.23 +	    << " sec"<< std::endl; 
    1.24    std::cout << "flow value: "<< max_flow_test.maxFlow() << std::endl;
    1.25    std::cout << "min cut value: "<< min_cut_value << std::endl;
    1.26    std::cout << "min min cut value: "<< min_min_cut_value << std::endl;