# HG changeset patch # User alpar # Date 1157636054 0 # Node ID 37b5c870a953174ac6026344eea0ae158f329651 # Parent 75a29ac69c193b682654c319dd1a4f16213c1afc Revert an unintentional commit in r2933 diff -r 75a29ac69c19 -r 37b5c870a953 benchmark/swap_bipartite_bench.cc --- a/benchmark/swap_bipartite_bench.cc Thu Sep 07 13:27:16 2006 +0000 +++ b/benchmark/swap_bipartite_bench.cc Thu Sep 07 13:34:14 2006 +0000 @@ -3,13 +3,12 @@ #include #include -#include #include #include #include -#include +#include #include #include @@ -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 aNodes; vector bNodes; - vector laNodes; - vector 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 bpmatch(lgraph); - - lnt.start(); - bpmatch.init(); - bpmatch.start(); - lnt.stop(); - } + + } - { - typedef SwapBpUGraphAdaptor SGraph; - SGraph sgraph(lgraph); - MaxBipartiteMatching 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; }