diff -r ee5959aa4410 -r c280de819a73 src/work/marci/preflow_demo_jacint.cc --- a/src/work/marci/preflow_demo_jacint.cc Sun Apr 17 18:57:22 2005 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,73 +0,0 @@ -#include -#include - -#include -#include -#include -#include -#include - -using namespace lemon; - -// Use a DIMACS max flow file as stdin. -// read_dimacs_demo < dimacs_max_flow_file -int main(int, char **) { - typedef ListGraph::NodeIt NodeIt; - typedef ListGraph::EachEdgeIt EachEdgeIt; - - ListGraph G; - NodeIt s, t; - ListGraph::EdgeMap cap(G); - readDimacsMaxFlow(std::cin, G, s, t, cap); - - { - std::cout << "preflow demo (preflow_push_max_flow by JACINT)..." << std::endl; - //ListGraph::EdgeMap flow(G); //0 flow - - double pre_time=currTime(); - preflow_push_max_flow max_flow_test(G, s, t, cap); - max_flow_test.run(); - ListGraph::NodeMap cut(G); - max_flow_test.mincut(cut); - int cut_value=0; - for(EachEdgeIt e=G.first(); e.valid(); ++e) { - if (cut.get(G.source(e)) && !cut.get(G.target(e))) cut_value+=cap.get(e); - } - double post_time=currTime(); - //std::cout << "maximum flow: "<< std::endl; - //for(EachEdgeIt e=G.first(); e.valid(); ++e) { - // std::cout<<"("<"< flow(G); //0 flow - - double pre_time=currTime(); - preflow_push_hl max_flow_test(G, s, t, cap); - max_flow_test.run(); - ListGraph::NodeMap cut(G); - max_flow_test.mincut(cut); - int cut_value=0; - for(EachEdgeIt e=G.first(); e.valid(); ++e) { - if (cut.get(G.source(e)) && !cut.get(G.target(e))) cut_value+=cap.get(e); - } - double post_time=currTime(); - //std::cout << "maximum flow: "<< std::endl; - //for(EachEdgeIt e=G.first(); e.valid(); ++e) { - // std::cout<<"("<"<