COIN-OR::LEMON - Graph Library

Changeset 1756:b1f441f24d08 in lemon-0.x for benchmark


Ignore:
Timestamp:
11/02/05 17:32:29 (14 years ago)
Author:
Alpar Juttner
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2288
Message:

GRAPH_TYPEDEFS and UNDIRGRAPH_TYPEDEFS macros added to graph_utils.h.

Location:
benchmark
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • benchmark/bench_tools.h

    r1689 r1756  
    66#include<iostream>
    77
     8#include<lemon/graph_utils.h>
    89#include<lemon/time_measure.h>
    9 
    10 ///An experimental typedef factory
    11 #define GRAPH_TYPEDEF_FACTORY(Graph) \
    12    typedef typename Graph::   Node      Node;\
    13    typedef typename Graph::   NodeIt    NodeIt;\
    14    typedef typename Graph::   Edge      Edge;\
    15    typedef typename Graph::   EdgeIt    EdgeIt;\
    16    typedef typename Graph:: InEdgeIt  InEdgeIt;\
    17    typedef typename Graph::OutEdgeIt OutEdgeIt;
    18 
    19 #define GRAPH_TYPEDEF_FACTORY_NOTYPENAME(Graph) \
    20    typedef Graph::   Node      Node;\
    21    typedef Graph::   NodeIt    NodeIt;\
    22    typedef Graph::   Edge      Edge;\
    23    typedef Graph::   EdgeIt    EdgeIt;\
    24    typedef Graph:: InEdgeIt  InEdgeIt;\
    25    typedef Graph::OutEdgeIt OutEdgeIt;
    26  
    2710
    2811///A primitive primtest
     
    9477void addHyperCube(Graph &G,int dim,std::vector<typename Graph::Node> &nodes)
    9578{
    96   GRAPH_TYPEDEF_FACTORY(Graph);
     79  GRAPH_TYPEDEFS(typename Graph);
    9780 
    9881  std::vector<int> bits(dim+1);
     
    11093void addBiDirHyperCube(Graph &G,int dim,std::vector<typename Graph::Node>&nodes)
    11194{
    112   GRAPH_TYPEDEF_FACTORY(Graph);
     95  GRAPH_TYPEDEFS(typename Graph);
    11396 
    11497  std::vector<int> bits(dim+1);
  • benchmark/bfs-bench.cc

    r1689 r1756  
    3232void bfsStlQueue(Graph &G,typename Graph::Node source)
    3333{
    34   GRAPH_TYPEDEF_FACTORY(Graph);
     34  GRAPH_TYPEDEFS(typename Graph);
    3535
    3636  using namespace std;
     
    5757void bfsOwnQueue(Graph &G,typename Graph::Node source)
    5858{
    59   GRAPH_TYPEDEF_FACTORY(Graph);
     59  GRAPH_TYPEDEFS(typename Graph);
    6060
    6161  using namespace std;
     
    8585void iteratorBench(Graph &G)
    8686{
    87   GRAPH_TYPEDEF_FACTORY(Graph);
     87  GRAPH_TYPEDEFS(typename Graph);
    8888
    8989  int i=0;
     
    9898  typedef SmartGraph Graph;
    9999
    100   ///\bug GRAPH_TYPEDEF_FACTORY(Graph);
    101   GRAPH_TYPEDEF_FACTORY_NOTYPENAME(Graph);
     100  GRAPH_TYPEDEFS(Graph);
    102101
    103102  Graph G;
  • benchmark/graph-bench.cc

    r1435 r1756  
    1515void makeFullGraph(int n, int rat, int p)
    1616{
    17   GRAPH_TYPEDEF_FACTORY(Graph);
     17  GRAPH_TYPEDEFS(typename Graph);
    1818
    1919  Graph G;
  • benchmark/hcube.cc

    r1689 r1756  
    3737  typedef SmartGraph Graph;
    3838
    39   ///\bug GRAPH_TYPEDEF_FACTORY(Graph);
    40   GRAPH_TYPEDEF_FACTORY_NOTYPENAME(Graph);
     39  GRAPH_TYPEDEFS(Graph);
    4140
    4241  Graph G;
Note: See TracChangeset for help on using the changeset viewer.