COIN-OR::LEMON - Graph Library

Ignore:
Timestamp:
09/07/06 15:34:14 (18 years ago)
Author:
Alpar Juttner
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2934
Message:

Revert an unintentional commit in r2933

File:
1 edited

Legend:

Unmodified
Added
Removed
  • benchmark/swap_bipartite_bench.cc

    r2207 r2208  
    44
    55#include <lemon/smart_graph.h>
    6 #include <lemon/list_graph.h>
    76
    87#include <lemon/bpugraph_adaptor.h>
     
    109
    1110#include <lemon/graph_utils.h>
    12 #include <lemon/dim2.h>
     11#include <lemon/xy.h>
    1312#include <lemon/graph_to_eps.h>
    1413
     
    1918
    2019typedef SmartBpUGraph Graph;
    21 typedef ListBpUGraph LGraph;
    2220BPUGRAPH_TYPEDEFS(Graph);
    2321
     
    4442   
    4543    Timer nt(false), st(false);
    46     Timer lnt(false), lst(false);
    4744   
    4845    for (int i = 0; i < s; ++i) {
    4946      Graph graph;
    50       LGraph lgraph;
    5147      vector<Node> aNodes;
    5248      vector<Node> bNodes; 
    53       vector<LGraph::Node> laNodes;
    54       vector<LGraph::Node> lbNodes; 
    5549     
    5650      for (int i = 0; i < n; ++i) {
    5751        Node node = graph.addANode();
    5852        aNodes.push_back(node);
    59         LGraph::Node lnode = lgraph.addANode();
    60         laNodes.push_back(lnode);
    6153      }
    6254      for (int i = 0; i < m; ++i) {
    6355        Node node = graph.addBNode();
    6456        bNodes.push_back(node);
    65         LGraph::Node lnode = lgraph.addBNode();
    66         lbNodes.push_back(lnode);
    6757      }
    6858      for (int i = 0; i < e; ++i) {
    69         int a,b;
    70         Node aNode = aNodes[a=urandom(n)];
    71         Node bNode = bNodes[b=urandom(m)];
     59        Node aNode = aNodes[urandom(n)];
     60        Node bNode = bNodes[urandom(m)];
    7261        graph.addEdge(aNode, bNode);
    73         LGraph::Node laNode = laNodes[a];
    74         LGraph::Node lbNode = lbNodes[b];
    75         lgraph.addEdge(laNode, lbNode);
    7662      }
    7763
     
    9682        st.stop();
    9783       
    98       }                 
    99       {
    100         MaxBipartiteMatching<LGraph> bpmatch(lgraph);
    101        
    102         lnt.start();
    103         bpmatch.init();
    104         bpmatch.start();
    105         lnt.stop();
    106        
    10784      }
     85                 
     86    }
    10887
    109       {
    110         typedef SwapBpUGraphAdaptor<LGraph> SGraph;
    111         SGraph sgraph(lgraph);
    112         MaxBipartiteMatching<SGraph> bpmatch(sgraph);
    113 
    114         lst.start();
    115         bpmatch.init();
    116         bpmatch.start();
    117         lst.stop();
    118        
    119       }
    120      }
    121 
    122     cout << k * 100 << ' ' << nt.realTime() << ' ' << st.realTime()
    123          << ' ' << lnt.realTime() << ' ' << lst.realTime()<< endl;
     88    cout << k * 100 << ' ' << nt.realTime() << ' ' << st.realTime() << endl;
    12489
    12590  }
Note: See TracChangeset for help on using the changeset viewer.