Revert an unintentional commit in r2933
authoralpar
Thu, 07 Sep 2006 13:34:14 +0000
changeset 220837b5c870a953
parent 2207 75a29ac69c19
child 2209 d3425607d41a
Revert an unintentional commit in r2933
benchmark/swap_bipartite_bench.cc
     1.1 --- a/benchmark/swap_bipartite_bench.cc	Thu Sep 07 13:27:16 2006 +0000
     1.2 +++ b/benchmark/swap_bipartite_bench.cc	Thu Sep 07 13:34:14 2006 +0000
     1.3 @@ -3,13 +3,12 @@
     1.4  #include <sstream>
     1.5  
     1.6  #include <lemon/smart_graph.h>
     1.7 -#include <lemon/list_graph.h>
     1.8  
     1.9  #include <lemon/bpugraph_adaptor.h>
    1.10  #include <lemon/bipartite_matching.h>
    1.11  
    1.12  #include <lemon/graph_utils.h>
    1.13 -#include <lemon/dim2.h>
    1.14 +#include <lemon/xy.h>
    1.15  #include <lemon/graph_to_eps.h>
    1.16  
    1.17  #include <lemon/time_measure.h>
    1.18 @@ -18,7 +17,6 @@
    1.19  using namespace lemon;
    1.20  
    1.21  typedef SmartBpUGraph Graph;
    1.22 -typedef ListBpUGraph LGraph;
    1.23  BPUGRAPH_TYPEDEFS(Graph);
    1.24  
    1.25  int _urandom_init() {
    1.26 @@ -43,36 +41,24 @@
    1.27      int s = 100;
    1.28      
    1.29      Timer nt(false), st(false);
    1.30 -    Timer lnt(false), lst(false);
    1.31      
    1.32      for (int i = 0; i < s; ++i) {
    1.33        Graph graph;
    1.34 -      LGraph lgraph;
    1.35        vector<Node> aNodes;
    1.36        vector<Node> bNodes;  
    1.37 -      vector<LGraph::Node> laNodes;
    1.38 -      vector<LGraph::Node> lbNodes;  
    1.39        
    1.40        for (int i = 0; i < n; ++i) {
    1.41          Node node = graph.addANode();
    1.42          aNodes.push_back(node);
    1.43 -        LGraph::Node lnode = lgraph.addANode();
    1.44 -        laNodes.push_back(lnode);
    1.45        }
    1.46        for (int i = 0; i < m; ++i) {
    1.47          Node node = graph.addBNode();
    1.48          bNodes.push_back(node);
    1.49 -        LGraph::Node lnode = lgraph.addBNode();
    1.50 -        lbNodes.push_back(lnode);
    1.51        }
    1.52        for (int i = 0; i < e; ++i) {
    1.53 -        int a,b;
    1.54 -	Node aNode = aNodes[a=urandom(n)];
    1.55 -        Node bNode = bNodes[b=urandom(m)];
    1.56 +        Node aNode = aNodes[urandom(n)];
    1.57 +        Node bNode = bNodes[urandom(m)];
    1.58          graph.addEdge(aNode, bNode);
    1.59 -	LGraph::Node laNode = laNodes[a];
    1.60 -        LGraph::Node lbNode = lbNodes[b];
    1.61 -        lgraph.addEdge(laNode, lbNode);
    1.62        }
    1.63  
    1.64        {
    1.65 @@ -95,32 +81,11 @@
    1.66          bpmatch.start();
    1.67          st.stop();
    1.68          
    1.69 -      }                 
    1.70 -      {
    1.71 -        MaxBipartiteMatching<LGraph> bpmatch(lgraph);
    1.72 -        
    1.73 -        lnt.start();
    1.74 -        bpmatch.init();
    1.75 -        bpmatch.start();
    1.76 -        lnt.stop();
    1.77 -        
    1.78        }
    1.79 +                  
    1.80 +    }
    1.81  
    1.82 -      {
    1.83 -        typedef SwapBpUGraphAdaptor<LGraph> SGraph;
    1.84 -        SGraph sgraph(lgraph);
    1.85 -        MaxBipartiteMatching<SGraph> bpmatch(sgraph);
    1.86 -
    1.87 -        lst.start();
    1.88 -        bpmatch.init();
    1.89 -        bpmatch.start();
    1.90 -        lst.stop();
    1.91 -        
    1.92 -      }
    1.93 -     }
    1.94 -
    1.95 -    cout << k * 100 << ' ' << nt.realTime() << ' ' << st.realTime()
    1.96 -	 << ' ' << lnt.realTime() << ' ' << lst.realTime()<< endl;
    1.97 +    cout << k * 100 << ' ' << nt.realTime() << ' ' << st.realTime() << endl;
    1.98  
    1.99    }
   1.100