src/work/alpar/f_ed_ka_demo.cc
changeset 118 38e16c594a4f
parent 117 67253d52b284
child 921 818510fa3d99
     1.1 --- a/src/work/alpar/f_ed_ka_demo.cc	Sun Feb 22 15:17:58 2004 +0000
     1.2 +++ b/src/work/alpar/f_ed_ka_demo.cc	Mon Feb 23 07:05:27 2004 +0000
     1.3 @@ -23,26 +23,28 @@
     1.4  
     1.5    Graph G;
     1.6    NodeIt s, t;
     1.7 +  Timer ts;
     1.8    Graph::DynEdgeMap<int> cap(G);
     1.9    readDimacsMaxFlow(std::cin, G, s, t, cap);
    1.10  
    1.11 +  std::cout << "loading time: " << ts << std::endl;
    1.12 +  ts.reset();
    1.13    std::cout << "edmonds karp demo..." << std::endl;
    1.14    Graph::DynEdgeMap<int> flow(G); //0 flow
    1.15    
    1.16    int ret;
    1.17 -  double pre_time=currTime();
    1.18 -  Timer ts;
    1.19 +  //  double pre_time=currTime();
    1.20    
    1.21    ret = maxFlow(G,flow,cap,s,t);
    1.22 -  double post_time=currTime();
    1.23 -  std::cout << "ellapsed time:" << ts << std::endl;
    1.24 +  //  double post_time=currTime();
    1.25 +  std::cout << "running time: " << ts << std::endl;
    1.26  
    1.27    //std::cout << "maximum flow: "<< std::endl;
    1.28    //for(EachEdgeIt e=G.first<EachEdgeIt>(); e.valid(); ++e) { 
    1.29    //  std::cout<<"("<<G.tail(e)<< "-"<<flow.get(e)<<"->"<<G.head(e)<<") ";
    1.30    //}
    1.31    //std::cout<<std::endl;
    1.32 -  std::cout << "elapsed time: " << post_time-pre_time << " sec"<< std::endl; 
    1.33 +  //  std::cout<<"elapsed time: " << post_time-pre_time << " sec"<< std::endl; 
    1.34    std::cout << "flow value: "<< ret << std::endl;
    1.35  
    1.36    return 0;