athos@511: #include athos@511: #include athos@511: athos@511: #include athos@511: #include athos@511: #include athos@511: //#include athos@511: athos@511: using namespace hugo; athos@511: athos@511: // Use a DIMACS max flow file as stdin. athos@511: // read_dimacs_demo < dimacs_max_flow_file athos@511: int main(int argc, char ** argv) { athos@511: typedef ListGraph Graph; athos@511: athos@511: typedef Graph::Node Node; athos@511: //typedef Graph::EachEdgeIt EachEdgeIt; athos@511: athos@511: Graph G; athos@511: Node s, t; athos@511: Graph::EdgeMap cap(G); athos@511: readDimacsMaxFlow(std::cin, G, s, t, cap); athos@511: athos@511: std::cout << "preflow demo (ATHOS)..." << std::endl; athos@511: //Graph::EdgeMap flow(G); //0 flow athos@511: athos@511: // double pre_time=currTime(); athos@511: athos@511: int k=1; athos@511: if (argc>1) athos@511: k = atoi(argv[1]); athos@511: MinLengthPaths > athos@511: surb_test(G,cap); athos@511: std::cout << surb_test.run(s,t,k) << std::endl; athos@511: std::cout << surb_test.totalLength() << std::endl; athos@511: //preflow_push max_flow_test(G, s, t, cap); athos@511: //int flow_value=max_flow_test.run(); athos@511: athos@511: //double post_time=currTime(); athos@511: athos@511: //std::cout << "elapsed time: " << post_time-pre_time << " sec"<< std::endl; athos@511: //std::cout << "flow value: "<< flow_value << std::endl; athos@511: athos@511: return 0; athos@511: }