COIN-OR::LEMON - Graph Library

source: lemon-tutorial/tools.dox @ 57:18404ec968ca

Last change on this file since 57:18404ec968ca was 57:18404ec968ca, checked in by Peter Kovacs <kpeter@…>, 15 years ago

Various small fixes

File size: 2.8 KB
Line 
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
19namespace 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
26Graph algorithms depend on various auxiliary data structures and algorithms.
27For example, heaps play an important role in Dijkstra and Prim
28algorithms, both the theoretical and practical performance of them
29are determined by the applied heap implementation.
30
31LEMON implements various such auxiliary tools. For instance,
32several data structures are available for maintaining \e disjoint \e sets.
33\ref UnionFind is the classical union-find data structure, which is
34used to implement the \ref Kruskal algorithm.
35The \ref UnionFindEnum and \ref HeapUnionFind classes are used in
36matching algorithms, the first one supports the enumeration of the
37items stored in the sets, while the second one also assigns priorities to the
38elements and an item having minimum priority can be retrieved set-wise.
39
40
41[SEC]sec_graph_to_eps[SEC] Postscript Exporting
42
43Another nice feature of the library is \ref graphToEps(), a highly
44configurable graph displaying tool (using EPS output format).
45Originally, it was developed to evaluate the flexibility and scalability
46of LEMON's approach to implement \ref named-param "named parameters".
47Later it has been evolved into a versatile tool featuring above 35 named
48parameters. 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
65Using this feature, various nice images can be generated from graphs,
66like this one.
67
68\image html graph_to_eps.png
69
70For more examples, see \ref graph_to_eps_demo.cc in the demo directory
71of the LEMON source.
72
73
74[SEC]sec_time_count[SEC] Time Measuring and Counting
75
76See \ref timecount.
77
78
79[SEC]sec_random[SEC] Random Number Generation
80
81See \ref Random.
82
83
84[SEC]sec_arg_parser[SEC] Argument Parser
85
86See \ref ArgParser.
87
88[TRAILER]
89*/
90}
Note: See TracBrowser for help on using the repository browser.