marci@82: #include marci@82: #include marci@82: athos@522: #include athos@522: #include marci@82: #include marci@82: #include marci@82: alpar@921: using namespace lemon; marci@82: marci@82: // Use a DIMACS max flow file as stdin. marci@82: // read_dimacs_demo < dimacs_max_flow_file marci@82: int main(int, char **) { athos@522: typedef ListGraph::Node Node; athos@522: //typedef ListGraph::EachEdgeIt EachEdgeIt; marci@82: marci@82: ListGraph G; athos@522: Node s, t; marci@82: ListGraph::EdgeMap cap(G); marci@82: readDimacsMaxFlow(std::cin, G, s, t, cap); marci@82: marci@82: std::cout << "preflow demo (ATHOS)..." << std::endl; marci@82: //ListGraph::EdgeMap flow(G); //0 flow marci@82: marci@82: double pre_time=currTime(); marci@82: preflow_push max_flow_test(G, s, t, cap); marci@82: int flow_value=max_flow_test.run(); marci@82: //ListGraph::NodeMap cut=max_flow_test.mincut(); marci@82: //int cut_value=0; marci@82: //for(EachEdgeIt e=G.first(); e.valid(); ++e) { marci@82: // if (cut.get(G.tail(e)) && !cut.get(G.head(e))) cut_value+=cap.get(e); marci@82: //} marci@82: double post_time=currTime(); marci@82: //std::cout << "maximum flow: "<< std::endl; marci@82: //for(EachEdgeIt e=G.first(); e.valid(); ++e) { marci@82: // std::cout<<"("<"<