// -*- c++ -*- #include #include #include #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 MutableGraph; // typedef SmartGraph Graph; typedef ListGraph Graph; typedef Graph::Node Node; typedef Graph::EdgeIt EdgeIt; // 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; Graph G; Node s, t; Graph::EdgeMap cap(G); readDimacsMaxFlow(std::cin, G, s, t, cap); { std::cout << "preflow ..." << std::endl; Graph::EdgeMap flow(G); //0 flow Timer ts; ts.reset(); Preflow, Graph::EdgeMap > max_flow_test(G, s, t, cap, flow); max_flow_test.run(); // int i=0; // while (max_flow_test.augmentOnBlockingFlow()) { // for(EdgeIt e=G.template first(); e.valid(); ++e) { // std::cout<<"("<"<(); e.valid(); ++e) { // std::cout<<"("<"< flow(G); //0 flow Timer ts; ts.reset(); MaxFlow, Graph::EdgeMap > max_flow_test(G, s, t, cap, flow); int i=0; while (max_flow_test.augmentOnBlockingFlow()) { // for(EdgeIt e=G.template first(); e.valid(); ++e) { // std::cout<<"("<"<(); e.valid(); ++e) { // std::cout<<"("<"< flow(G); //0 flow Timer ts; ts.reset(); MaxFlow, Graph::EdgeMap > max_flow_test(G, s, t, cap, flow); int i=0; while (max_flow_test.augmentOnBlockingFlow1()) { // for(EdgeIt e=G.template first(); e.valid(); ++e) { // std::cout<<"("<"<(); e.valid(); ++e) { // std::cout<<"("<"< flow(G); //0 flow Timer ts; ts.reset(); MaxFlow, Graph::EdgeMap > max_flow_test(G, s, t, cap, flow); int i=0; while (max_flow_test.augmentOnBlockingFlow2()) { // for(EdgeIt e=G.template first(); e.valid(); ++e) { // std::cout<<"("<"<(); e.valid(); ++e) { // std::cout<<"("<"< flow(G); //0 flow Timer ts; ts.reset(); MaxFlow, Graph::EdgeMap > max_flow_test(G, s, t, cap, flow); int i=0; while (max_flow_test.augmentOnShortestPath()) { // for(EdgeIt e=G.template first(); e.valid(); ++e) { // std::cout<<"("<"<(); e.valid(); ++e) { // std::cout<<"("<"<