diff -r 8572feccddcf -r 24c2c2989e0f src/work/marci/read_dimacs_demo.cc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/work/marci/read_dimacs_demo.cc Mon Feb 09 13:11:10 2004 +0000 @@ -0,0 +1,33 @@ +#include +#include +#include +#include +#include + +using namespace marci; + +// Use a DIMACS max flow file as stdin. +// read_dimacs_demo < dimacs_flow_file +int main(int, char **) { + typedef ListGraph::NodeIt NodeIt; + typedef ListGraph::EachEdgeIt EachEdgeIt; + + ListGraph G; + NodeIt s, t; + ListGraph::EdgeMap cap(G); + readDimacsMaxFlow(std::cin, G, s, t, cap); + + std::cout << "augmenting path flow algorithm demo..." << std::endl; + ListGraph::EdgeMap flow(G); //0 flow + MaxFlow, ListGraph::EdgeMap > max_flow_test(G, s, t, flow, cap); + max_flow_test.run(); + + std::cout << "maximum flow: "<< std::endl; + for(EachEdgeIt e=G.first(); e.valid(); ++e) { + std::cout<<"("<"<