src/benchmark/graph-bench.cc
changeset 1143 4fb22cfa5759
parent 718 75d36edc6bc4
child 1403 c479984e459d
equal deleted inserted replaced
3:7f3940f21ea0 4:ed7078a75132
     1 #include<math.h>
     1 #include<math.h>
     2 #include<hugo/list_graph.h>
     2 #include<lemon/list_graph.h>
     3 
     3 
     4 #include"bench_tools.h"
     4 #include"bench_tools.h"
     5 
     5 
     6 using namespace hugo;
     6 using namespace lemon;
     7 
     7 
     8 ///Makes a full graph by adding and deleting a lot of edges;
     8 ///Makes a full graph by adding and deleting a lot of edges;
     9 
     9 
    10 ///\param n Number of nodes.
    10 ///\param n Number of nodes.
    11 ///\param rat The funcion will make \f$rat\timesn^2\f$ edge addition and
    11 ///\param rat The funcion will make \f$rat\timesn^2\f$ edge addition and
    43   //  for(int i=0;1;i++) ;
    43   //  for(int i=0;1;i++) ;
    44 }
    44 }
    45 
    45 
    46 int main()
    46 int main()
    47 {
    47 {
    48   hugo::Timer T;
    48   lemon::Timer T;
    49   makeFullGraph<ListGraph>(nextPrim(1000),nextPrim(300),nextPrim(100));
    49   makeFullGraph<ListGraph>(nextPrim(1000),nextPrim(300),nextPrim(100));
    50   
    50   
    51   PrintTime("BIG",T);
    51   PrintTime("BIG",T);
    52   T.reset();
    52   T.reset();
    53   makeFullGraph<ListGraph>(nextPrim(100),nextPrim(30000),nextPrim(150));
    53   makeFullGraph<ListGraph>(nextPrim(100),nextPrim(30000),nextPrim(150));