#include #include #include "smart_graph.h" #include "../list_graph.hh" #include "../marci/dimacs.hh" #include "f_ed_ka.h" #include "../marci/time_measure.h" using namespace hugo; // Use a DIMACS max flow file as stdin. // read_dimacs_demo < dimacs_max_flow_file int main(int, char **) { typedef SmartGraph Graph; //typedef ListGraph Graph; typedef Graph::NodeIt NodeIt; typedef Graph::EachNodeIt EachNodeIt; typedef Graph::EachEdgeIt EachEdgeIt; Graph G; NodeIt s, t; Timer ts; Graph::DynEdgeMap cap(G); readDimacsMaxFlow(std::cin, G, s, t, cap); std::cout << "loading time: " << ts << std::endl; ts.reset(); std::cout << "edmonds karp demo..." << std::endl; Graph::DynEdgeMap flow(G); //0 flow int ret; // double pre_time=currTime(); ret = maxFlow(G,flow,cap,s,t); // double post_time=currTime(); std::cout << "running time: " << ts << std::endl; //std::cout << "maximum flow: "<< std::endl; //for(EachEdgeIt e=G.first(); e.valid(); ++e) { // std::cout<<"("<"<