marci@73: #include marci@73: #include marci@73: marci@73: #include marci@73: #include marci@73: #include marci@73: #include marci@73: marci@73: using namespace marci; marci@73: marci@73: // Use a DIMACS max flow file as stdin. marci@73: // read_dimacs_demo < dimacs_max_flow_file marci@73: int main(int, char **) { marci@73: typedef ListGraph::NodeIt NodeIt; marci@73: typedef ListGraph::EachEdgeIt EachEdgeIt; marci@73: marci@73: ListGraph G; marci@73: NodeIt s, t; marci@73: ListGraph::EdgeMap cap(G); marci@73: readDimacsMaxFlow(std::cin, G, s, t, cap); marci@73: marci@73: std::cout << "edmonds karp demo..." << std::endl; marci@73: ListGraph::EdgeMap flow(G); //0 flow marci@73: marci@73: double pre_time=currTime(); marci@73: MaxFlow, ListGraph::EdgeMap > max_flow_test(G, s, t, flow, cap); marci@73: max_flow_test.run(); marci@73: double post_time=currTime(); marci@73: //std::cout << "maximum flow: "<< std::endl; marci@73: //for(EachEdgeIt e=G.first(); e.valid(); ++e) { marci@73: // std::cout<<"("<"<