Turn off 32bit specific tests.
1 #include"edge_lookup_test.h"
2 #include<lemon/smart_graph.h>
4 #include<lemon/time_measure.h>
8 GRAPH_TYPEDEFS(SmartGraph)
9 typedef SmartGraph Graph;
15 FE(Graph &g) :_g(g) {}
20 for(NodeIt v(_g);v!=INVALID;++v)
21 for(NodeIt u(_g);u!=INVALID;++u)
31 EdgeLookUp<Graph> _el;
32 EL(Graph &g) :_g(g), _el(g) {}
37 for(NodeIt v(_g);v!=INVALID;++v)
38 for(NodeIt u(_g);u!=INVALID;++u)
47 EdgeLookUp2<Graph> _el;
48 EL2(Graph &g) :_g(g), _el(g) {}
53 for(NodeIt v(_g);v!=INVALID;++v)
54 for(NodeIt u(_g);u!=INVALID;++u)
64 EdgeLookUp3<Graph> _el;
65 EL3(Graph &g) :_g(g), _el(g) {}
70 for(NodeIt v(_g);v!=INVALID;++v)
71 for(NodeIt u(_g);u!=INVALID;++u)
81 EdgeLookUp4<Graph> _el;
82 EL4(Graph &g) :_g(g), _el(g) {}
87 for(NodeIt v(_g);v!=INVALID;++v)
88 for(NodeIt u(_g);u!=INVALID;++u)
94 int main(int, char**argv)
97 int M=int(N*atof(argv[2]));
102 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)]);
108 // TimeReport t("findEdge: ");
109 // for(NodeIt u(g);u!=INVALID;++u)
110 // for(NodeIt v(g);v!=INVALID;++v)
111 // e=findEdge(g,u,v);
115 // EdgeLookUp<Graph> el(g);
117 // TimeReport t("EdgeLookUp: ");
118 // for(NodeIt u(g);u!=INVALID;++u)
119 // for(NodeIt v(g);v!=INVALID;++v)
124 TimeStamp t1 = runningTimeTest(FE(g),1);
125 TimeStamp t2 = runningTimeTest(EL(g),1);
126 TimeStamp t3 = runningTimeTest(EL2(g),1);
127 TimeStamp t4 = runningTimeTest(EL3(g),1);
128 TimeStamp t5 = runningTimeTest(EL4(g),1);
130 std::cout << t1.userTime()/N/N << ' '
131 << t2.userTime()/N/N << ' '
132 << t3.userTime()/N/N << ' '
133 << t4.userTime()/N/N << ' '
134 << t5.userTime()/N/N << std::endl;