Better 'Naming Convention' conformance.
5 #include <lemon/smart_graph.h>
7 #include <lemon/bpugraph_adaptor.h>
8 #include <lemon/bipartite_matching.h>
10 #include <lemon/graph_utils.h>
12 #include <lemon/graph_to_eps.h>
14 #include <lemon/time_measure.h>
17 using namespace lemon;
19 typedef SmartBpUGraph Graph;
20 BPUGRAPH_TYPEDEFS(Graph);
29 static int seed = _urandom_init();
30 ignore_unused_variable_warning(seed);
31 return (int)(rand() / (1.0 + RAND_MAX) * n);
36 for (int k = 1; k < 100; ++k) {
39 int m = (100 - k) * 100;
43 Timer nt(false), st(false);
45 for (int i = 0; i < s; ++i) {
50 for (int i = 0; i < n; ++i) {
51 Node node = graph.addANode();
52 aNodes.push_back(node);
54 for (int i = 0; i < m; ++i) {
55 Node node = graph.addBNode();
56 bNodes.push_back(node);
58 for (int i = 0; i < e; ++i) {
59 Node aNode = aNodes[urandom(n)];
60 Node bNode = bNodes[urandom(m)];
61 graph.addEdge(aNode, bNode);
65 MaxBipartiteMatching<Graph> bpmatch(graph);
75 typedef SwapBpUGraphAdaptor<Graph> SGraph;
77 MaxBipartiteMatching<SGraph> bpmatch(sgraph);
88 cout << k * 100 << ' ' << nt.realTime() << ' ' << st.realTime() << endl;