# HG changeset patch # User marci # Date 1084983610 0 # Node ID 8c13444bccf6598b8cc24827e9bfa0d83a2f93e6 # Parent 19dd325da0e8adeaa46f16c2f31c7dea2ebbb4d2 for_each fix diff -r 19dd325da0e8 -r 8c13444bccf6 src/work/marci/leda/bipartite_matching_leda.cc --- a/src/work/marci/leda/bipartite_matching_leda.cc Wed May 19 16:09:38 2004 +0000 +++ b/src/work/marci/leda/bipartite_matching_leda.cc Wed May 19 16:20:10 2004 +0000 @@ -10,11 +10,11 @@ #include #include -#include +#include //#include //#include #include -#include +#include #include #include #include @@ -51,8 +51,8 @@ typedef LedaGraphWrapper Graph; Graph g(lg); - //for UndirListGraph - //typedef UndirListGraph Graph; + //for UndirSageGraph + //typedef UndirSageGraph Graph; //Graph g; typedef Graph::Node Node; @@ -107,7 +107,7 @@ ts.reset(); FOR_EACH_LOC(stGW::EdgeIt, e, stgw) flow.set(e, 0); // while (max_flow_test.augmentOnShortestPath()) { } - typedef ListGraph MutableGraph; + typedef SageGraph MutableGraph; // while (max_flow_test.augmentOnBlockingFlow1()) { while (max_flow_test.augmentOnBlockingFlow2()) { std::cout << max_flow_test.flowValue() << std::endl; diff -r 19dd325da0e8 -r 8c13444bccf6 src/work/marci/leda/bipartite_matching_leda_gen.cc --- a/src/work/marci/leda/bipartite_matching_leda_gen.cc Wed May 19 16:09:38 2004 +0000 +++ b/src/work/marci/leda/bipartite_matching_leda_gen.cc Wed May 19 16:20:10 2004 +0000 @@ -10,11 +10,11 @@ #include #include -#include +#include //#include //#include #include -#include +#include #include #include #include @@ -51,8 +51,8 @@ typedef LedaGraphWrapper Graph; Graph g(lg); - //for UndirListGraph - //typedef UndirListGraph Graph; + //for UndirSageGraph + //typedef UndirSageGraph Graph; //Graph g; typedef Graph::Node Node; @@ -124,7 +124,7 @@ ts.reset(); FOR_EACH_LOC(stGW::EdgeIt, e, stgw) flow.set(e, 0); - typedef ListGraph MutableGraph; + typedef SageGraph MutableGraph; while (max_flow_test.augmentOnBlockingFlow()) { } std::cout << "HUGO max matching algorithm based on blocking flow augmentation." << std::endl << "Matching size: " diff -r 19dd325da0e8 -r 8c13444bccf6 src/work/marci/leda/comparison.cc --- a/src/work/marci/leda/comparison.cc Wed May 19 16:09:38 2004 +0000 +++ b/src/work/marci/leda/comparison.cc Wed May 19 16:20:10 2004 +0000 @@ -10,11 +10,11 @@ #include #include -#include +#include //#include //#include #include -#include +#include #include #include #include @@ -51,8 +51,8 @@ typedef LedaGraphWrapper Graph; Graph g(lg); - //for UndirListGraph - //typedef UndirListGraph Graph; + //for UndirSageGraph + //typedef UndirSageGraph Graph; //Graph g; typedef Graph::Node Node; @@ -123,7 +123,7 @@ // ts.reset(); // FOR_EACH_LOC(stGW::EdgeIt, e, stgw) flow.set(e, 0); -// typedef ListGraph MutableGraph; +// typedef SageGraph MutableGraph; // while (max_flow_test.augmentOnBlockingFlow()) { } // std::cout << "HUGO max matching algorithm based on blocking flow augmentation." // << std::endl << "Matching size: " @@ -131,11 +131,11 @@ // std::cout << "elapsed time: " << ts << std::endl << std::endl; { - ListGraph hg; - ListGraph::Node s=hg.addNode(); - ListGraph::Node t=hg.addNode(); - BGW::NodeMap b_s_nodes(bgw); - BGW::NodeMap b_t_nodes(bgw); + SageGraph hg; + SageGraph::Node s=hg.addNode(); + SageGraph::Node t=hg.addNode(); + BGW::NodeMap b_s_nodes(bgw); + BGW::NodeMap b_t_nodes(bgw); FOR_EACH_INC_LOC(BGW::ClassNodeIt, n, bgw, BGW::S_CLASS) { b_s_nodes.set(n, hg.addNode()); @@ -149,17 +149,17 @@ FOR_EACH_LOC(BGW::EdgeIt, e, bgw) hg.addEdge(b_s_nodes[bgw.tail(e)], b_t_nodes[bgw.head(e)]); - ConstMap cm(1); - ListGraph::EdgeMap flow(hg); //0 + ConstMap cm(1); + SageGraph::EdgeMap flow(hg); //0 Timer ts; ts.reset(); - MaxFlow, - ListGraph::EdgeMap > + MaxFlow, + SageGraph::EdgeMap > max_flow_test(hg, s, t, cm, flow); max_flow_test.run(); - std::cout << "HUGO max matching algorithm on ListGraph by copying the graph, based on preflow." + std::cout << "HUGO max matching algorithm on SageGraph by copying the graph, based on preflow." << std::endl << "Size of matching: " << max_flow_test.flowValue() << std::endl;