COIN-OR::LEMON - Graph Library

source: lemon-0.x/doc/groups.dox @ 2491:b63ae56979ef

Last change on this file since 2491:b63ae56979ef was 2491:b63ae56979ef, checked in by Balazs Dezso, 17 years ago

Documentation for lemon tools

File size: 13.9 KB
Line 
1/* -*- C++ -*-
2 *
3 * This file is a part of LEMON, a generic C++ optimization library
4 *
5 * Copyright (C) 2003-2007
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/**
20@defgroup datas Data Structures
21This group describes the several graph structures implemented in LEMON.
22*/
23
24/**
25@defgroup graphs Graph Structures
26@ingroup datas
27\brief Graph structures implemented in LEMON.
28
29The implementation of combinatorial algorithms heavily relies on
30efficient graph implementations. LEMON offers data structures which are
31planned to be easily used in an experimental phase of implementation studies,
32and thereafter the program code can be made efficient by small modifications.
33
34The most efficient implementation of diverse applications require the
35usage of different physical graph implementations. These differences
36appear in the size of graph we require to handle, memory or time usage
37limitations or in the set of operations through which the graph can be
38accessed.  LEMON provides several physical graph structures to meet
39the diverging requirements of the possible users.  In order to save on
40running time or on memory usage, some structures may fail to provide
41some graph features like edge or node deletion.
42
43Alteration of standard containers need a very limited number of
44operations, these together satisfy the everyday requirements.
45In the case of graph structures, different operations are needed which do
46not alter the physical graph, but gives another view. If some nodes or
47edges have to be hidden or the reverse oriented graph have to be used, then
48this is the case. It also may happen that in a flow implementation
49the residual graph can be accessed by another algorithm, or a node-set
50is to be shrunk for another algorithm.
51LEMON also provides a variety of graphs for these requirements called
52\ref graph_adaptors "graph adaptors". Adaptors cannot be used alone but only
53in conjunction with other graph representation.
54
55You are free to use the graph structure that fit your requirements
56the best, most graph algorithms and auxiliary data structures can be used
57with any graph structures.
58*/
59
60/**
61@defgroup semi_adaptors Semi-Adaptors Classes for Graphs
62@ingroup graphs
63\brief Graph types between real graphs and graph adaptors.
64
65Graph types between real graphs and graph adaptors. These classes wrap
66graphs to give new functionality as the adaptors do it. On the other
67hand they are not light-weight structures as the adaptors.
68*/
69
70/**
71@defgroup maps Maps
72@ingroup datas
73\brief Some special purpose map to make life easier.
74
75LEMON provides several special maps that e.g. combine
76new maps from existing ones.
77*/
78
79/**
80@defgroup graph_maps Graph Maps
81@ingroup maps
82\brief Special Graph-Related Maps.
83
84These maps are specifically designed to assign values to the nodes and edges of
85graphs.
86*/
87
88
89/**
90\defgroup map_adaptors Map Adaptors
91\ingroup maps
92\brief Tools to create new maps from existing ones
93
94Map adaptors are used to create "implicit" maps from other maps.
95
96Most of them are \ref lemon::concepts::ReadMap "ReadMap"s. They can
97make arithmetic operations between one or two maps (negation, scaling,
98addition, multiplication etc.) or e.g. convert a map to another one
99of different Value type.
100
101The typical usage of this classes is the passing implicit maps to
102algorithms.  If a function type algorithm is called then the function
103type map adaptors can be used comfortable. For example let's see the
104usage of map adaptors with the \c graphToEps() function:
105\code
106  Color nodeColor(int deg) {
107    if (deg >= 2) {
108      return Color(0.5, 0.0, 0.5);
109    } else if (deg == 1) {
110      return Color(1.0, 0.5, 1.0);
111    } else {
112      return Color(0.0, 0.0, 0.0);
113    }
114  }
115 
116  Graph::NodeMap<int> degree_map(graph);
117 
118  graphToEps(graph, "graph.eps")
119    .coords(coords).scaleToA4().undirected()
120    .nodeColors(composeMap(functorMap(nodeColor), degree_map))
121    .run();
122\endcode
123The \c functorMap() function makes an \c int to \c Color map from the
124\e nodeColor() function. The \c composeMap() compose the \e degree_map
125and the previous created map. The composed map is proper function to
126get color of each node.
127
128The usage with class type algorithms is little bit harder. In this
129case the function type map adaptors can not be used, because the
130function map adaptors give back temporarly objects.
131\code
132  Graph graph;
133 
134  typedef Graph::EdgeMap<double> DoubleEdgeMap;
135  DoubleEdgeMap length(graph);
136  DoubleEdgeMap speed(graph);
137 
138  typedef DivMap<DoubleEdgeMap, DoubleEdgeMap> TimeMap;
139 
140  TimeMap time(length, speed);
141 
142  Dijkstra<Graph, TimeMap> dijkstra(graph, time);
143  dijkstra.run(source, target);
144\endcode
145
146We have a length map and a maximum speed map on a graph. The minimum
147time to pass the edge can be calculated as the division of the two
148maps which can be done implicitly with the \c DivMap template
149class. We use the implicit minimum time map as the length map of the
150\c Dijkstra algorithm.
151*/
152
153/**
154@defgroup matrices Matrices
155@ingroup datas
156\brief Two dimensional data storages.
157
158Two dimensional data storages.
159*/
160
161/**
162@defgroup paths Path Structures
163@ingroup datas
164\brief Path structures implemented in LEMON.
165
166LEMON provides flexible data structures
167to work with paths.
168
169All of them have similar interfaces, and it can be copied easily with
170assignment operator and copy constructor. This make it easy and
171efficient to have e.g. the Dijkstra algorithm to store its result in
172any kind of path structure.
173
174\sa lemon::concepts::Path
175
176*/
177
178/**
179@defgroup auxdat Auxiliary Data Structures
180@ingroup datas
181\brief Some data structures implemented in LEMON.
182
183This group describes the data structures implemented in LEMON in
184order to make it easier to implement combinatorial algorithms.
185*/
186
187
188/**
189@defgroup algs Algorithms
190\brief This group describes the several algorithms
191implemented in LEMON.
192
193This group describes the several algorithms
194implemented in LEMON.
195*/
196
197/**
198@defgroup search Graph Search
199@ingroup algs
200\brief This group contains the common graph
201search algorithms.
202
203This group contains the common graph
204search algorithms like Bfs and Dfs.
205*/
206
207/**
208@defgroup shortest_path Shortest Path algorithms
209@ingroup algs
210\brief This group describes the algorithms
211for finding shortest paths.
212
213This group describes the algorithms for finding shortest paths in
214graphs.
215
216*/
217
218/**
219@defgroup max_flow Maximum Flow algorithms
220@ingroup algs
221\brief This group describes the algorithms for finding maximum flows.
222
223This group describes the algorithms for finding maximum flows and
224feasible circulations.
225
226\image html flow.png
227\image latex flow.eps "Graph flow" width=\textwidth
228*/
229
230/**
231@defgroup min_cost_flow Minimum Cost Flow algorithms
232@ingroup algs
233
234\brief This group describes the algorithms
235for finding minimum cost flows and circulations.
236
237This group describes the algorithms for finding minimum cost flows and
238circulations. 
239*/
240
241/**
242@defgroup min_cut Minimum Cut algorithms
243@ingroup algs
244\brief This group describes the algorithms
245for finding minimum cut in graphs.
246
247This group describes the algorithms
248for finding minimum cut in graphs.
249*/
250
251/**
252@defgroup graph_prop Connectivity and other graph properties
253@ingroup algs
254\brief This group describes the algorithms
255for discover the graph properties
256
257This group describes the algorithms for discover the graph properties
258like connectivity, bipartiteness, euler property, simplicity, etc...
259
260\image html edge_biconnected_components.png
261\image latex edge_biconnected_components.eps "bi-edge-connected components" width=\textwidth
262*/
263
264/**
265@defgroup matching Matching algorithms
266@ingroup algs
267\brief This group describes the algorithms
268for find matchings in graphs and bipartite graphs.
269
270This group provides some algorithm objects and function
271to calculate matchings in graphs and bipartite graphs.
272
273\image html bipartite_matching.png
274\image latex bipartite_matching.eps "Bipartite Matching" width=\textwidth
275
276*/
277
278/**
279@defgroup spantree Minimum Spanning Tree algorithms
280@ingroup algs
281\brief This group contains the algorithms for finding a minimum cost spanning
282tree in a graph
283
284This group contains the algorithms for finding a minimum cost spanning
285tree in a graph
286*/
287
288
289/**
290@defgroup auxalg Auxiliary algorithms
291@ingroup algs
292\brief Some algorithms implemented in LEMON.
293
294This group describes the algorithms in LEMON in order to make
295it easier to implement complex algorithms.
296*/
297
298/**
299@defgroup approx Approximation algorithms
300\brief Approximation algorithms
301
302Approximation and heuristic algorithms
303*/
304
305/**
306@defgroup gen_opt_group General Optimization Tools
307\brief This group describes some general optimization frameworks
308implemented in LEMON.
309
310This group describes some general optimization frameworks
311implemented in LEMON.
312
313*/
314
315/**
316@defgroup lp_group Lp and Mip solvers
317@ingroup gen_opt_group
318\brief Lp and Mip solver interfaces for LEMON.
319
320This group describes Lp and Mip solver interfaces for LEMON. The
321various LP solvers could be used in the same manner with this
322interface.
323
324*/
325
326/**
327@defgroup lp_utils Tools for Lp and Mip solvers
328@ingroup lp_group
329\brief This group adds some helper tools to the Lp and Mip solvers
330implemented in LEMON.
331
332This group adds some helper tools to general optimization framework
333implemented in LEMON.
334*/
335
336/**
337@defgroup metah Metaheuristics
338@ingroup gen_opt_group
339\brief Metaheuristics for LEMON library.
340
341This group contains some metaheuristic optimization tools.
342*/
343
344/**
345@defgroup utils Tools and Utilities
346\brief Tools and Utilities for Programming in LEMON
347
348Tools and Utilities for Programming in LEMON
349*/
350
351/**
352@defgroup gutils Basic Graph Utilities
353@ingroup utils
354\brief This group describes some simple basic graph utilities.
355
356This group describes some simple basic graph utilities.
357*/
358
359/**
360@defgroup misc Miscellaneous Tools
361@ingroup utils
362Here you can find several useful tools for development,
363debugging and testing.
364*/
365
366
367/**
368@defgroup timecount Time measuring and Counting
369@ingroup misc
370Here you can find simple tools for measuring the performance
371of algorithms.
372*/
373
374/**
375@defgroup graphbits Tools for Graph Implementation
376@ingroup utils
377\brief Tools to Make It Easier to Make Graphs.
378
379This group describes the tools that makes it easier to make graphs and
380the maps that dynamically update with the graph changes.
381*/
382
383/**
384@defgroup exceptions Exceptions
385@ingroup utils
386This group contains the exceptions thrown by LEMON library
387*/
388
389/**
390@defgroup io_group Input-Output
391\brief Several Graph Input-Output methods
392
393Here you can find tools for importing and exporting graphs
394and graph related data. Now it supports the LEMON format, the
395\c DIMACS format and the encapsulated postscript format.
396*/
397
398/**
399@defgroup lemon_io Lemon Input-Output
400@ingroup io_group
401\brief Reading and writing LEMON format
402
403Methods for reading and writing LEMON format. More about this
404format you can find on the \ref graph-io-page "Graph Input-Output"
405tutorial pages.
406*/
407
408/**
409@defgroup section_io Section readers and writers
410@ingroup lemon_io
411\brief Section readers and writers for lemon Input-Output.
412
413Here you can find which section readers and writers can attach to
414the LemonReader and LemonWriter.
415*/
416
417/**
418@defgroup item_io Item Readers and Writers
419@ingroup lemon_io
420\brief Item readers and writers for lemon Input-Output.
421
422The Input-Output classes can handle more data type by example
423as map or attribute value. Each of these should be written and
424read some way. The module make possible to do this. 
425*/
426
427/**
428@defgroup eps_io Postscript exporting
429@ingroup io_group
430\brief General \c EPS drawer and graph exporter
431
432This group contains general \c EPS drawing methods and special
433graph exporting tools.
434*/
435
436
437/**
438@defgroup concept Concepts
439\brief Skeleton classes and concept checking classes
440
441This group describes the data/algorithm skeletons and concept checking
442classes implemented in LEMON.
443
444The purpose of the classes in this group is fourfold.
445 
446- These classes contain the documentations of the concepts. In order
447  to avoid document multiplications, an implementation of a concept
448  simply refers to the corresponding concept class.
449
450- These classes declare every functions, <tt>typedef</tt>s etc. an
451  implementation of the concepts should provide, however completely
452  without implementations and real data structures behind the
453  interface. On the other hand they should provide nothing else. All
454  the algorithms working on a data structure meeting a certain concept
455  should compile with these classes. (Though it will not run properly,
456  of course.) In this way it is easily to check if an algorithm
457  doesn't use any extra feature of a certain implementation.
458
459- The concept descriptor classes also provide a <em>checker class</em>
460  that makes it possible check whether a certain implementation of a
461  concept indeed provides all the required features.
462
463- Finally, They can serve as a skeleton of a new implementation of a concept.
464
465*/
466
467
468/**
469@defgroup graph_concepts Graph Structure Concepts
470@ingroup concept
471\brief Skeleton and concept checking classes for graph structures
472
473This group contains the skeletons and concept checking classes of LEMON's
474graph structures and helper classes used to implement these.
475*/
476
477/* --- Unused group
478@defgroup experimental Experimental Structures and Algorithms
479This group contains some Experimental structures and algorithms.
480The stuff here is subject to change.
481*/
482
483/**
484\anchor demoprograms
485
486@defgroup demos Demo programs
487
488Some demo programs are listed here. Their full source codes can be found in
489the \c demo subdirectory of the source tree.
490
491The standard compilation procedure (<tt>./configure;make</tt>) will compile
492them, as well.
493
494*/
495
496/**
497@defgroup tools Standalone utility applications
498
499Some utility applications are listed here.
500
501The standard compilation procedure (<tt>./configure;make</tt>) will compile
502them, as well.
503
504*/
505
Note: See TracBrowser for help on using the repository browser.