#include #include #include #include #include #include using namespace hugo; // Use a DIMACS max flow file as stdin. // read_dimacs_demo < dimacs_max_flow_file /* struct Ize { }; struct Mize { Ize bumm; }; template class Huha { public: int u; B brr; }; */ int main(int, char **) { typedef ListGraph::NodeIt NodeIt; typedef ListGraph::EachEdgeIt EachEdgeIt; /* Mize mize[10]; Mize bize[0]; Mize zize; typedef Mize Tize[0]; std::cout << &zize << " " << sizeof(mize) << sizeof(Tize) << std::endl; std::cout << sizeof(bize) << std::endl; Huha k; std::cout << sizeof(k) << std::endl; struct Bumm { //int a; bool b; }; std::cout << sizeof(Bumm) << std::endl; */ ListGraph G; NodeIt s, t; ListGraph::EdgeMap cap(G); readDimacsMaxFlow(std::cin, G, s, t, cap); { std::cout << "edmonds karp demo (blocking flow augmentation)..." << std::endl; ListGraph::EdgeMap flow(G); //0 flow Timer ts; ts.reset(); //double pre_time=currTime(); MaxFlow, ListGraph::EdgeMap > max_flow_test(G, s, t, flow, cap); //max_flow_test.augmentWithBlockingFlow(); int i=0; while (max_flow_test.augmentOnBlockingFlow()) { ++i; } //double post_time=currTime(); //std::cout << "maximum flow: "<< std::endl; //for(EachEdgeIt e=G.first(); e.valid(); ++e) { // std::cout<<"("<"< flow(G); //0 flow Timer ts; ts.reset(); //double pre_time=currTime(); MaxFlow, ListGraph::EdgeMap > max_flow_test(G, s, t, flow, cap); //max_flow_test.augmentWithBlockingFlow(); int i=0; while (max_flow_test.augmentOnShortestPath()) { ++i; } //double post_time=currTime(); //std::cout << "maximum flow: "<< std::endl; //for(EachEdgeIt e=G.first(); e.valid(); ++e) { // std::cout<<"("<"<