equal
deleted
inserted
replaced
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: "); |