[Lemon-commits] [lemon_svn] marci: r848 - hugo/trunk/src/work/marci/leda
Lemon SVN
svn at lemon.cs.elte.hu
Mon Nov 6 20:41:50 CET 2006
Author: marci
Date: Wed May 19 18:20:10 2004
New Revision: 848
Modified:
hugo/trunk/src/work/marci/leda/bipartite_matching_leda.cc
hugo/trunk/src/work/marci/leda/bipartite_matching_leda_gen.cc
hugo/trunk/src/work/marci/leda/comparison.cc
Log:
for_each fix
Modified: hugo/trunk/src/work/marci/leda/bipartite_matching_leda.cc
==============================================================================
--- hugo/trunk/src/work/marci/leda/bipartite_matching_leda.cc (original)
+++ hugo/trunk/src/work/marci/leda/bipartite_matching_leda.cc Wed May 19 18:20:10 2004
@@ -10,11 +10,11 @@
#include <LEDA/graph_gen.h>
#include <leda_graph_wrapper.h>
-#include <list_graph.h>
+#include <sage_graph.h>
//#include <smart_graph.h>
//#include <dimacs.h>
#include <hugo/time_measure.h>
-#include <for_each_macros.h>
+#include <hugo/for_each_macros.h>
#include <hugo/graph_wrapper.h>
#include <bipartite_graph_wrapper.h>
#include <hugo/maps.h>
@@ -51,8 +51,8 @@
typedef LedaGraphWrapper<leda::graph> 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<MutableGraph>()) {
while (max_flow_test.augmentOnBlockingFlow2()) {
std::cout << max_flow_test.flowValue() << std::endl;
Modified: hugo/trunk/src/work/marci/leda/bipartite_matching_leda_gen.cc
==============================================================================
--- hugo/trunk/src/work/marci/leda/bipartite_matching_leda_gen.cc (original)
+++ hugo/trunk/src/work/marci/leda/bipartite_matching_leda_gen.cc Wed May 19 18:20:10 2004
@@ -10,11 +10,11 @@
#include <LEDA/graph_gen.h>
#include <leda_graph_wrapper.h>
-#include <list_graph.h>
+#include <sage_graph.h>
//#include <smart_graph.h>
//#include <dimacs.h>
#include <hugo/time_measure.h>
-#include <for_each_macros.h>
+#include <hugo/for_each_macros.h>
#include <hugo/graph_wrapper.h>
#include <bipartite_graph_wrapper.h>
#include <hugo/maps.h>
@@ -51,8 +51,8 @@
typedef LedaGraphWrapper<leda::graph> 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<MutableGraph>()) { }
std::cout << "HUGO max matching algorithm based on blocking flow augmentation."
<< std::endl << "Matching size: "
Modified: hugo/trunk/src/work/marci/leda/comparison.cc
==============================================================================
--- hugo/trunk/src/work/marci/leda/comparison.cc (original)
+++ hugo/trunk/src/work/marci/leda/comparison.cc Wed May 19 18:20:10 2004
@@ -10,11 +10,11 @@
#include <LEDA/graph_gen.h>
#include <leda_graph_wrapper.h>
-#include <list_graph.h>
+#include <sage_graph.h>
//#include <smart_graph.h>
//#include <dimacs.h>
#include <hugo/time_measure.h>
-#include <for_each_macros.h>
+#include <hugo/for_each_macros.h>
#include <hugo/graph_wrapper.h>
#include <bipartite_graph_wrapper.h>
#include <hugo/maps.h>
@@ -51,8 +51,8 @@
typedef LedaGraphWrapper<leda::graph> 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<MutableGraph>()) { }
// 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<ListGraph::Node> b_s_nodes(bgw);
- BGW::NodeMap<ListGraph::Node> b_t_nodes(bgw);
+ SageGraph hg;
+ SageGraph::Node s=hg.addNode();
+ SageGraph::Node t=hg.addNode();
+ BGW::NodeMap<SageGraph::Node> b_s_nodes(bgw);
+ BGW::NodeMap<SageGraph::Node> 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<ListGraph::Edge, int> cm(1);
- ListGraph::EdgeMap<int> flow(hg); //0
+ ConstMap<SageGraph::Edge, int> cm(1);
+ SageGraph::EdgeMap<int> flow(hg); //0
Timer ts;
ts.reset();
- MaxFlow<ListGraph, int, ConstMap<ListGraph::Edge, int>,
- ListGraph::EdgeMap<int> >
+ MaxFlow<SageGraph, int, ConstMap<SageGraph::Edge, int>,
+ SageGraph::EdgeMap<int> >
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;
More information about the Lemon-commits
mailing list