src/benchmark/graph-bench.cc
changeset 718 75d36edc6bc4
parent 711 b6c56353832c
child 921 818510fa3d99
     1.1 --- a/src/benchmark/graph-bench.cc	Wed Jul 21 07:01:14 2004 +0000
     1.2 +++ b/src/benchmark/graph-bench.cc	Wed Jul 21 07:03:20 2004 +0000
     1.3 @@ -1,7 +1,5 @@
     1.4  #include<math.h>
     1.5  #include<hugo/list_graph.h>
     1.6 -#include<hugo/time_measure.h>
     1.7 -#include<iostream>
     1.8  
     1.9  #include"bench_tools.h"
    1.10  
    1.11 @@ -28,7 +26,7 @@
    1.12    //Edge equ[rat];
    1.13    std::vector<Edge> equ(rat);
    1.14    
    1.15 -  unsigned long long int count;
    1.16 +  long long int count;
    1.17    
    1.18    for(count=0;count<rat;count++) {
    1.19      equ[count%rat]=G.addEdge(nodes[(count*p)%n],nodes[(count*p/n)%n]);
    1.20 @@ -38,21 +36,21 @@
    1.21      if(count%rat) G.erase(equ[count%rat]);
    1.22      equ[count%rat]=G.addEdge(nodes[(count*p)%n],nodes[(count*p/n)%n]);
    1.23    }
    1.24 -  std::cout << "Added " << count
    1.25 -	    << " ( " << n << "^2 * " << rat << " ) edges\n";
    1.26 +//   std::cout << "Added " << count
    1.27 +// 	    << " ( " << n << "^2 * " << rat << " ) edges\n";
    1.28 +
    1.29 +
    1.30    //  for(int i=0;1;i++) ;
    1.31  }
    1.32  
    1.33  int main()
    1.34  {
    1.35 -  std::cout << "START: n="  << nextPrim(1000) << " rat="
    1.36 -	    << nextPrim(300) << " p=" << nextPrim(100) << '\n';
    1.37    hugo::Timer T;
    1.38    makeFullGraph<ListGraph>(nextPrim(1000),nextPrim(300),nextPrim(100));
    1.39 -  std::cout << T  << '\n';
    1.40 -  std::cout << "START: n="  << nextPrim(1000) << " rat="
    1.41 -	    << nextPrim(300) << " p=" << nextPrim(100) << '\n';
    1.42 +  
    1.43 +  PrintTime("BIG",T);
    1.44    T.reset();
    1.45    makeFullGraph<ListGraph>(nextPrim(100),nextPrim(30000),nextPrim(150));
    1.46 -  std::cout << T  << '\n';
    1.47 +
    1.48 +  PrintTime("SMALL",T);
    1.49  }