[Lemon-commits] [lemon_svn] alpar: r2934 - hugo/trunk/benchmark
Lemon SVN
svn at lemon.cs.elte.hu
Mon Nov 6 21:51:20 CET 2006
Author: alpar
Date: Thu Sep 7 15:34:14 2006
New Revision: 2934
Modified:
hugo/trunk/benchmark/swap_bipartite_bench.cc
Log:
Revert an unintentional commit in r2933
Modified: hugo/trunk/benchmark/swap_bipartite_bench.cc
==============================================================================
--- hugo/trunk/benchmark/swap_bipartite_bench.cc (original)
+++ hugo/trunk/benchmark/swap_bipartite_bench.cc Thu Sep 7 15:34:14 2006
@@ -3,13 +3,12 @@
#include <sstream>
#include <lemon/smart_graph.h>
-#include <lemon/list_graph.h>
#include <lemon/bpugraph_adaptor.h>
#include <lemon/bipartite_matching.h>
#include <lemon/graph_utils.h>
-#include <lemon/dim2.h>
+#include <lemon/xy.h>
#include <lemon/graph_to_eps.h>
#include <lemon/time_measure.h>
@@ -18,7 +17,6 @@
using namespace lemon;
typedef SmartBpUGraph Graph;
-typedef ListBpUGraph LGraph;
BPUGRAPH_TYPEDEFS(Graph);
int _urandom_init() {
@@ -43,36 +41,24 @@
int s = 100;
Timer nt(false), st(false);
- Timer lnt(false), lst(false);
for (int i = 0; i < s; ++i) {
Graph graph;
- LGraph lgraph;
vector<Node> aNodes;
vector<Node> bNodes;
- vector<LGraph::Node> laNodes;
- vector<LGraph::Node> lbNodes;
for (int i = 0; i < n; ++i) {
Node node = graph.addANode();
aNodes.push_back(node);
- LGraph::Node lnode = lgraph.addANode();
- laNodes.push_back(lnode);
}
for (int i = 0; i < m; ++i) {
Node node = graph.addBNode();
bNodes.push_back(node);
- LGraph::Node lnode = lgraph.addBNode();
- lbNodes.push_back(lnode);
}
for (int i = 0; i < e; ++i) {
- int a,b;
- Node aNode = aNodes[a=urandom(n)];
- Node bNode = bNodes[b=urandom(m)];
+ Node aNode = aNodes[urandom(n)];
+ Node bNode = bNodes[urandom(m)];
graph.addEdge(aNode, bNode);
- LGraph::Node laNode = laNodes[a];
- LGraph::Node lbNode = lbNodes[b];
- lgraph.addEdge(laNode, lbNode);
}
{
@@ -95,32 +81,11 @@
bpmatch.start();
st.stop();
- }
- {
- MaxBipartiteMatching<LGraph> bpmatch(lgraph);
-
- lnt.start();
- bpmatch.init();
- bpmatch.start();
- lnt.stop();
-
- }
-
- {
- typedef SwapBpUGraphAdaptor<LGraph> SGraph;
- SGraph sgraph(lgraph);
- MaxBipartiteMatching<SGraph> bpmatch(sgraph);
-
- lst.start();
- bpmatch.init();
- bpmatch.start();
- lst.stop();
-
}
- }
+
+ }
- cout << k * 100 << ' ' << nt.realTime() << ' ' << st.realTime()
- << ' ' << lnt.realTime() << ' ' << lst.realTime()<< endl;
+ cout << k * 100 << ' ' << nt.realTime() << ' ' << st.realTime() << endl;
}
More information about the Lemon-commits
mailing list