1 | /* -*- mode: C++; indent-tabs-mode: nil; -*- |
---|
2 | * |
---|
3 | * This file is a part of LEMON, a generic C++ optimization library. |
---|
4 | * |
---|
5 | * Copyright (C) 2003-2010 |
---|
6 | * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport |
---|
7 | * (Egervary Research Group on Combinatorial Optimization, EGRES). |
---|
8 | * |
---|
9 | * Permission to use, modify and distribute this software is granted |
---|
10 | * provided that this copyright notice appears in all copies. For |
---|
11 | * precise terms see the accompanying LICENSE file. |
---|
12 | * |
---|
13 | * This software is provided "AS IS" with no warranty of any kind, |
---|
14 | * express or implied, and with no claim as to its suitability for any |
---|
15 | * purpose. |
---|
16 | * |
---|
17 | */ |
---|
18 | |
---|
19 | namespace lemon { |
---|
20 | /** |
---|
21 | [PAGE]sec_tools[PAGE] Tools |
---|
22 | |
---|
23 | \todo This page is under construction. |
---|
24 | |
---|
25 | [SEC]sec_aux_structures[SEC] Auxiliary Data Structures |
---|
26 | Graph algorithms depend on various auxiliary data structures and algorithms. |
---|
27 | For example, heaps play an important role in Dijkstra and Prim |
---|
28 | algorithms, both the theoretical and practical performance of them |
---|
29 | are determined by the applied heap implementation. |
---|
30 | |
---|
31 | LEMON implements various such auxiliary tools. For instance, |
---|
32 | several data structures are available for maintaining \e disjoint \e sets. |
---|
33 | \ref UnionFind is the classical union-find data structure, which is |
---|
34 | used to implement the \ref Kruskal algorithm. |
---|
35 | The \ref UnionFindEnum and \ref HeapUnionFind classes are used in |
---|
36 | matching algorithms, the first one supports the enumeration of the |
---|
37 | items stored in the sets, while the second one also assigns priorities to the |
---|
38 | elements and an item having minimum priority can be retrieved set-wise. |
---|
39 | |
---|
40 | |
---|
41 | [SEC]sec_graph_to_eps[SEC] Postscript Exporting |
---|
42 | |
---|
43 | Another nice feature of the library is \ref graphToEps(), a highly |
---|
44 | configurable graph displaying tool (using EPS output format). |
---|
45 | Originally, it was developed to evaluate the flexibility and scalability |
---|
46 | of LEMON's approach to implement named parameters. Later it |
---|
47 | has been evolved into a versatile tool featuring above 35 named |
---|
48 | parameters. The following code demonstrates its typical use. |
---|
49 | |
---|
50 | \code |
---|
51 | graphToEps(g, "graph.eps") |
---|
52 | .coords(coords) |
---|
53 | .title("Sample EPS figure") |
---|
54 | .copyright("(c) 2003-2010 LEMON Project") |
---|
55 | .absoluteNodeSizes().absoluteArcWidths() |
---|
56 | .nodeScale(2).nodeSizes(sizes) |
---|
57 | .nodeShapes(shapes) |
---|
58 | .nodeColors(composeMap(palette, colors)) |
---|
59 | .arcColors(composeMap(palette, acolors)) |
---|
60 | .arcWidthScale(.4).arcWidths(widths) |
---|
61 | .nodeTexts(id).nodeTextSize(3) |
---|
62 | .run(); |
---|
63 | \endcode |
---|
64 | |
---|
65 | Using this feature, various nice images can be generated from graphs, |
---|
66 | like this one. |
---|
67 | |
---|
68 | \image html graph_to_eps.png |
---|
69 | |
---|
70 | |
---|
71 | [SEC]sec_time_count[SEC] Time Measuring and Counting |
---|
72 | |
---|
73 | See \ref timecount. |
---|
74 | |
---|
75 | |
---|
76 | [SEC]sec_random[SEC] Random Number Generation |
---|
77 | |
---|
78 | See \ref Random. |
---|
79 | |
---|
80 | |
---|
81 | [SEC]sec_arg_parser[SEC] Argument Parser |
---|
82 | |
---|
83 | See \ref ArgParser. |
---|
84 | |
---|
85 | [TRAILER] |
---|
86 | */ |
---|
87 | } |
---|