4 #include <list_graph.hh>
6 #include <preflow_param.h>
7 #include <time_measure.h>
11 // Use a DIMACS max flow file as stdin.
12 // read_dimacs_demo < dimacs_max_flow_file
13 int main(int, char **) {
14 typedef ListGraph::NodeIt NodeIt;
15 typedef ListGraph::EachEdgeIt EachEdgeIt;
19 ListGraph::EdgeMap<int> cap(G);
20 readDimacsMaxFlow(std::cin, G, s, t, cap);
22 std::cout << "preflow parameters test ..." << std::endl;
29 for (int j=1; j!=40; ++j ){
30 for (int k=1; k!=j; ++k ){
32 double mintime=1000000;
34 for ( int i=1; i!=4; ++i ) {
35 double pre_time=currTime();
36 preflow_param<ListGraph, int> max_flow_test(G, s, t, cap, j, k);
37 double post_time=currTime();
38 if ( mintime > post_time-pre_time ) mintime = post_time-pre_time;
40 if (min > mintime ) {min=mintime; _j=j; _k=k;}
44 std::cout<<"Min. at ("<<_j<<","<<_k<<") in time "<<min<<std::endl;