src/benchmark/graph-bench.cc
changeset 711 b6c56353832c
parent 708 429dfcbbf47d
child 718 75d36edc6bc4
     1.1 --- a/src/benchmark/graph-bench.cc	Tue Jul 20 09:43:12 2004 +0000
     1.2 +++ b/src/benchmark/graph-bench.cc	Tue Jul 20 09:50:11 2004 +0000
     1.3 @@ -2,39 +2,11 @@
     1.4  #include<hugo/list_graph.h>
     1.5  #include<hugo/time_measure.h>
     1.6  #include<iostream>
     1.7 -#include<sage_graph.h>
     1.8 -#include<vector>
     1.9 +
    1.10 +#include"bench_tools.h"
    1.11  
    1.12  using namespace hugo;
    1.13  
    1.14 -///An experimental typedef factory
    1.15 -#define GRAPH_TYPEDEF_FACTORY(Graph) \
    1.16 -   typedef typename Graph::   Node      Node;\
    1.17 -   typedef typename Graph::   NodeIt    NodeIn;\
    1.18 -   typedef typename Graph::   Edge      Edge;\
    1.19 -   typedef typename Graph::   EdgeIt    EdgeIt;\
    1.20 -   typedef typename Graph:: InEdgeIt  InEdgeIt;\
    1.21 -   typedef typename Graph::OutEdgeIt OutEdgeIt;
    1.22 - 
    1.23 -
    1.24 -///A primitive primtest
    1.25 -bool isPrim(int n)
    1.26 -{
    1.27 -  if(n%2) {
    1.28 -    for(int k=3;n/k>=k;k+=2)
    1.29 -      if(!(n%k)) return false;
    1.30 -    return true;
    1.31 -  }
    1.32 -  return false;
    1.33 -}
    1.34 -
    1.35 -///Finds the smallest prime not less then \c n.
    1.36 -int nextPrim(int n)
    1.37 -{
    1.38 -  for(n+=!(n%2);!isPrim(n);n+=2) ;
    1.39 -  return n;
    1.40 -}
    1.41 -
    1.42  ///Makes a full graph by adding and deleting a lot of edges;
    1.43  
    1.44  ///\param n Number of nodes.