src/work/marci/preflow_demo_jacint.cc
changeset 986 e997802b855c
parent 921 818510fa3d99
     1.1 --- a/src/work/marci/preflow_demo_jacint.cc	Sat Nov 13 12:24:01 2004 +0000
     1.2 +++ b/src/work/marci/preflow_demo_jacint.cc	Sat Nov 13 12:53:28 2004 +0000
     1.3 @@ -31,12 +31,12 @@
     1.4    max_flow_test.mincut(cut);
     1.5    int cut_value=0;
     1.6    for(EachEdgeIt e=G.first<EachEdgeIt>(); e.valid(); ++e) {
     1.7 -    if (cut.get(G.tail(e)) && !cut.get(G.head(e))) cut_value+=cap.get(e);
     1.8 +    if (cut.get(G.source(e)) && !cut.get(G.target(e))) cut_value+=cap.get(e);
     1.9    }
    1.10    double post_time=currTime();
    1.11    //std::cout << "maximum flow: "<< std::endl;
    1.12    //for(EachEdgeIt e=G.first<EachEdgeIt>(); e.valid(); ++e) { 
    1.13 -  //  std::cout<<"("<<G.tail(e)<< "-"<<flow.get(e)<<"->"<<G.head(e)<<") ";
    1.14 +  //  std::cout<<"("<<G.source(e)<< "-"<<flow.get(e)<<"->"<<G.target(e)<<") ";
    1.15    //}
    1.16    //std::cout<<std::endl;
    1.17    std::cout << "elapsed time: " << post_time-pre_time << " sec"<< std::endl; 
    1.18 @@ -55,12 +55,12 @@
    1.19    max_flow_test.mincut(cut);
    1.20    int cut_value=0;
    1.21    for(EachEdgeIt e=G.first<EachEdgeIt>(); e.valid(); ++e) {
    1.22 -    if (cut.get(G.tail(e)) && !cut.get(G.head(e))) cut_value+=cap.get(e);
    1.23 +    if (cut.get(G.source(e)) && !cut.get(G.target(e))) cut_value+=cap.get(e);
    1.24    }
    1.25    double post_time=currTime();
    1.26    //std::cout << "maximum flow: "<< std::endl;
    1.27    //for(EachEdgeIt e=G.first<EachEdgeIt>(); e.valid(); ++e) { 
    1.28 -  //  std::cout<<"("<<G.tail(e)<< "-"<<flow.get(e)<<"->"<<G.head(e)<<") ";
    1.29 +  //  std::cout<<"("<<G.source(e)<< "-"<<flow.get(e)<<"->"<<G.target(e)<<") ";
    1.30    //}
    1.31    //std::cout<<std::endl;
    1.32    std::cout << "elapsed time: " << post_time-pre_time << " sec"<< std::endl;