# HG changeset patch # User jacint # Date 1077452236 0 # Node ID cf7b01232d8625f4034c8600f28c2b659d33da21 # Parent 0220e23a954cb15b79e0b180e2f1c8c5205be68a *** empty log message *** diff -r 0220e23a954c -r cf7b01232d86 src/work/jacint/preflow.cc --- a/src/work/jacint/preflow.cc Sun Feb 22 11:45:38 2004 +0000 +++ b/src/work/jacint/preflow.cc Sun Feb 22 12:17:16 2004 +0000 @@ -30,8 +30,10 @@ if ( mintime > post_time-pre_time ) mintime = post_time-pre_time; } - preflow max_flow_test(G, s, t, cap); - + double pre_time=currTime(); + preflow max_flow_test(G, s, t, cap); + double post_time=currTime(); + ListGraph::NodeMap cut(G); max_flow_test.minCut(cut); int min_cut_value=0; @@ -56,6 +58,10 @@ } std::cout << "min time of 10 runs: " << mintime << " sec"<< std::endl; + std::cout << "phase 0: " << max_flow_test.time-pre_time + << " sec"<< std::endl; + std::cout << "phase 1: " << post_time-max_flow_test.time + << " sec"<< std::endl; std::cout << "flow value: "<< max_flow_test.maxFlow() << std::endl; std::cout << "min cut value: "<< min_cut_value << std::endl; std::cout << "min min cut value: "<< min_min_cut_value << std::endl; diff -r 0220e23a954c -r cf7b01232d86 src/work/jacint/preflow.h --- a/src/work/jacint/preflow.h Sun Feb 22 11:45:38 2004 +0000 +++ b/src/work/jacint/preflow.h Sun Feb 22 12:17:16 2004 +0000 @@ -8,7 +8,7 @@ list 'level_list' on the nodes on level i implemented by hand stack 'active' on the active nodes on level i implemented by hand runs heuristic 'highest label' for H1*n relabels - runs heuristic 'dound decrease' for H0*n relabels, starts with 'highest label' + runs heuristic 'bound decrease' for H0*n relabels, starts with 'highest label' Parameters H0 and H1 are initialized to 20 and 10. @@ -44,6 +44,8 @@ #include #include +#include + namespace hugo { template bfs_queue; bfs_queue.push(s);