diff -r 54d8feda437b -r dce64ce044d6 src/work/marci/leda/bipartite_matching_leda.cc --- a/src/work/marci/leda/bipartite_matching_leda.cc Thu Apr 29 16:45:40 2004 +0000 +++ b/src/work/marci/leda/bipartite_matching_leda.cc Thu Apr 29 16:59:00 2004 +0000 @@ -18,8 +18,7 @@ //#include #include #include -#include -#include +#include /** * Inicializalja a veletlenszamgeneratort. @@ -101,10 +100,12 @@ ConstMap const1map(1); Timer ts; + stGW::EdgeMap flow(stgw); + MaxFlow, stGW::EdgeMap > + max_flow_test(stgw, stgw.S_NODE, stgw.T_NODE, const1map, flow); + ts.reset(); - stGW::EdgeMap max_flow(stgw); - MaxFlow, stGW::EdgeMap > - max_flow_test(stgw, stgw.S_NODE, stgw.T_NODE, const1map, max_flow); + FOR_EACH_LOC(stGW::EdgeIt, e, stgw) flow.set(e, 0); // while (max_flow_test.augmentOnShortestPath()) { } typedef ListGraph MutableGraph; // while (max_flow_test.augmentOnBlockingFlow1()) { @@ -113,35 +114,17 @@ } std::cout << "max flow value: " << max_flow_test.flowValue() << std::endl; std::cout << "elapsed time: " << ts << std::endl; -// FOR_EACH_LOC(stGW::EdgeIt, e, stgw) { -// std::cout << e << ": " << max_flow[e] << "\n"; -// } -// std::cout << "\n"; ts.reset(); - stGW::EdgeMap pre_flow(stgw); - Preflow, stGW::EdgeMap > - pre_flow_test(stgw, stgw.S_NODE, stgw.T_NODE, const1map, pre_flow/*, true*/); - pre_flow_test.run(); + FOR_EACH_LOC(stGW::EdgeIt, e, stgw) flow.set(e, 0); + max_flow_test.run(); std::cout << "pre flow value: " << max_flow_test.flowValue() << std::endl; std::cout << "elapsed time: " << ts << std::endl; -// FOR_EACH_LOC(stGW::EdgeIt, e, stgw) { -// std::cout << e << ": " << pre_flow[e] << "\n"; -// } -// std::cout << "\n"; ts.reset(); leda_list ml=MAX_CARD_BIPARTITE_MATCHING(lg); - // stGW::EdgeMap pre_flow(stgw); - //Preflow, stGW::EdgeMap > - // pre_flow_test(stgw, stgw.S_NODE, stgw.T_NODE, const1map, pre_flow, true); - //pre_flow_test.run(); std::cout << "leda matching value: " << ml.size() << std::endl; std::cout << "elapsed time: " << ts << std::endl; -// FOR_EACH_LOC(stGW::EdgeIt, e, stgw) { -// std::cout << e << ": " << pre_flow[e] << "\n"; -// } -// std::cout << "\n"; return 0; }