diff -r 72143568cadc -r 325c9430723e src/work/athos/minlength_demo.cc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/work/athos/minlength_demo.cc Mon May 03 10:27:20 2004 +0000 @@ -0,0 +1,45 @@ +#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 argc, char ** argv) { + typedef ListGraph Graph; + + typedef Graph::Node Node; + //typedef Graph::EachEdgeIt EachEdgeIt; + + Graph G; + Node s, t; + Graph::EdgeMap cap(G); + readDimacsMaxFlow(std::cin, G, s, t, cap); + + std::cout << "preflow demo (ATHOS)..." << std::endl; + //Graph::EdgeMap flow(G); //0 flow + + // double pre_time=currTime(); + + int k=1; + if (argc>1) + k = atoi(argv[1]); + MinLengthPaths > + surb_test(G,cap); + std::cout << surb_test.run(s,t,k) << std::endl; + std::cout << surb_test.totalLength() << std::endl; + //preflow_push max_flow_test(G, s, t, cap); + //int flow_value=max_flow_test.run(); + + //double post_time=currTime(); + + //std::cout << "elapsed time: " << post_time-pre_time << " sec"<< std::endl; + //std::cout << "flow value: "<< flow_value << std::endl; + + return 0; +}