Several doc improvements.
5 #include <lemon/smart_graph.h>
6 #include <lemon/list_graph.h>
8 #include <lemon/bpugraph_adaptor.h>
9 #include <lemon/bipartite_matching.h>
11 #include <lemon/graph_utils.h>
12 #include <lemon/graph_to_eps.h>
14 #include <lemon/time_measure.h>
15 #include <lemon/random.h>
18 using namespace lemon;
20 typedef SmartBpUGraph Graph;
21 typedef ListBpUGraph LGraph;
22 BPUGRAPH_TYPEDEFS(Graph);
27 for (int k = 1; k < 100; ++k) {
30 int m = (100 - k) * 100;
34 Timer nt(false), st(false);
35 Timer lnt(false), lst(false);
37 for (int i = 0; i < s; ++i) {
42 vector<LGraph::Node> laNodes;
43 vector<LGraph::Node> lbNodes;
45 for (int i = 0; i < n; ++i) {
46 Node node = graph.addANode();
47 aNodes.push_back(node);
48 LGraph::Node lnode = lgraph.addANode();
49 laNodes.push_back(lnode);
51 for (int i = 0; i < m; ++i) {
52 Node node = graph.addBNode();
53 bNodes.push_back(node);
54 LGraph::Node lnode = lgraph.addBNode();
55 lbNodes.push_back(lnode);
57 for (int i = 0; i < e; ++i) {
59 Node aNode = aNodes[a=rnd[n]];
60 Node bNode = bNodes[b=rnd[m]];
61 graph.addEdge(aNode, bNode);
62 LGraph::Node laNode = laNodes[a];
63 LGraph::Node lbNode = lbNodes[b];
64 lgraph.addEdge(laNode, lbNode);
68 MaxBipartiteMatching<Graph> bpmatch(graph);
78 typedef SwapBpUGraphAdaptor<Graph> SGraph;
80 MaxBipartiteMatching<SGraph> bpmatch(sgraph);
89 MaxBipartiteMatching<LGraph> bpmatch(lgraph);
99 typedef SwapBpUGraphAdaptor<LGraph> SGraph;
100 SGraph sgraph(lgraph);
101 MaxBipartiteMatching<SGraph> bpmatch(sgraph);
111 cout << k * 100 << ' ' << nt.realTime() << ' ' << st.realTime()
112 << ' ' << lnt.realTime() << ' ' << lst.realTime()<< endl;