#include #include #include #include #include #include using namespace hugo; // 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 << "edmonds karp demo (blocking flow augmentation)..." << std::endl; ListGraph::EdgeMap flow(G); //0 flow double pre_time=currTime(); MaxFlow, ListGraph::EdgeMap > max_flow_test(G, s, t, flow, cap); //max_flow_test.augmentWithBlockingFlow(); max_flow_test.run(); 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(); MaxFlow, ListGraph::EdgeMap > max_flow_test(G, s, t, flow, cap); //max_flow_test.augmentWithBlockingFlow(); max_flow_test.run(); double post_time=currTime(); //std::cout << "maximum flow: "<< std::endl; //for(EachEdgeIt e=G.first(); e.valid(); ++e) { // std::cout<<"("<"<