benchmark/edge_lookup.cc
changeset 2248 1ac928089d68
parent 2240 d93c034d3c98
child 2252 133028e83940
equal deleted inserted replaced
2:a06f41b47660 3:ce4998091d84
     1 #include"edge_lookup_test.h"
     1 #include"edge_lookup_test.h"
     2 #include<lemon/smart_graph.h>
     2 #include<lemon/smart_graph.h>
     3 #include<vector>
     3 #include<vector>
     4 #include<lemon/time_measure.h>
     4 #include<lemon/time_measure.h>
       
     5 #include<lemon/random.h>
     5 
     6 
     6 using namespace lemon;
     7 using namespace lemon;
     7 
     8 
     8 GRAPH_TYPEDEFS(SmartGraph)
     9 GRAPH_TYPEDEFS(SmartGraph)
     9 typedef SmartGraph Graph;
    10 typedef SmartGraph Graph;
    98   
    99   
    99   Graph g;
   100   Graph g;
   100   
   101   
   101   std::vector<Node> v;
   102   std::vector<Node> v;
   102   for(int i=0;i<N;i++) v.push_back(g.addNode());
   103   for(int i=0;i<N;i++) v.push_back(g.addNode());
   103   for(int i=0;i<M;i++) g.addEdge(v[int(drand48()*N)],v[int(drand48()*N)]);
   104   for(int i=0;i<M;i++) g.addEdge(v[rnd[N]],v[rnd[N]]);
   104 
   105 
   105 //   {
   106 //   {
   106 //     Edge e;
   107 //     Edge e;
   107     
   108     
   108 //     TimeReport t("findEdge: ");
   109 //     TimeReport t("findEdge: ");