EdgeLookUp and AllEdgeLookUp tests added.
5 #include <lemon/smart_graph.h>
7 #include <lemon/bpugraph_adaptor.h>
8 #include <lemon/bipartite_matching.h>
10 #include <lemon/graph_utils.h>
11 #include <lemon/graph_to_eps.h>
13 #include <lemon/time_measure.h>
16 using namespace lemon;
18 typedef SmartBpUGraph Graph;
19 BPUGRAPH_TYPEDEFS(Graph);
28 static int seed = _urandom_init();
29 ignore_unused_variable_warning(seed);
30 return (int)(rand() / (1.0 + RAND_MAX) * n);
35 for (int k = 1; k < 100; ++k) {
38 int m = (100 - k) * 100;
42 Timer nt(false), st(false);
44 for (int i = 0; i < s; ++i) {
49 for (int i = 0; i < n; ++i) {
50 Node node = graph.addANode();
51 aNodes.push_back(node);
53 for (int i = 0; i < m; ++i) {
54 Node node = graph.addBNode();
55 bNodes.push_back(node);
57 for (int i = 0; i < e; ++i) {
58 Node aNode = aNodes[urandom(n)];
59 Node bNode = bNodes[urandom(m)];
60 graph.addEdge(aNode, bNode);
64 MaxBipartiteMatching<Graph> bpmatch(graph);
74 typedef SwapBpUGraphAdaptor<Graph> SGraph;
76 MaxBipartiteMatching<SGraph> bpmatch(sgraph);
87 cout << k * 100 << ' ' << nt.realTime() << ' ' << st.realTime() << endl;