doc/groups.dox
author Peter Kovacs <kpeter@inf.elte.hu>
Thu, 09 Oct 2008 13:47:26 +0200
branch1.0
changeset 302 3a2e0692eaae
parent 236 da953e387d31
child 320 12626fc94ccf
permissions -rw-r--r--
Remove references to tools that have not been ported yet (ticket #119)
alpar@209
     1
/* -*- mode: C++; indent-tabs-mode: nil; -*-
alpar@40
     2
 *
alpar@209
     3
 * This file is a part of LEMON, a generic C++ optimization library.
alpar@40
     4
 *
alpar@40
     5
 * Copyright (C) 2003-2008
alpar@40
     6
 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
alpar@40
     7
 * (Egervary Research Group on Combinatorial Optimization, EGRES).
alpar@40
     8
 *
alpar@40
     9
 * Permission to use, modify and distribute this software is granted
alpar@40
    10
 * provided that this copyright notice appears in all copies. For
alpar@40
    11
 * precise terms see the accompanying LICENSE file.
alpar@40
    12
 *
alpar@40
    13
 * This software is provided "AS IS" with no warranty of any kind,
alpar@40
    14
 * express or implied, and with no claim as to its suitability for any
alpar@40
    15
 * purpose.
alpar@40
    16
 *
alpar@40
    17
 */
alpar@40
    18
alpar@40
    19
/**
alpar@40
    20
@defgroup datas Data Structures
kpeter@50
    21
This group describes the several data structures implemented in LEMON.
alpar@40
    22
*/
alpar@40
    23
alpar@40
    24
/**
alpar@40
    25
@defgroup graphs Graph Structures
alpar@40
    26
@ingroup datas
alpar@40
    27
\brief Graph structures implemented in LEMON.
alpar@40
    28
alpar@209
    29
The implementation of combinatorial algorithms heavily relies on
alpar@209
    30
efficient graph implementations. LEMON offers data structures which are
alpar@209
    31
planned to be easily used in an experimental phase of implementation studies,
alpar@209
    32
and thereafter the program code can be made efficient by small modifications.
alpar@40
    33
alpar@40
    34
The most efficient implementation of diverse applications require the
alpar@40
    35
usage of different physical graph implementations. These differences
alpar@40
    36
appear in the size of graph we require to handle, memory or time usage
alpar@40
    37
limitations or in the set of operations through which the graph can be
alpar@40
    38
accessed.  LEMON provides several physical graph structures to meet
alpar@40
    39
the diverging requirements of the possible users.  In order to save on
alpar@40
    40
running time or on memory usage, some structures may fail to provide
kpeter@83
    41
some graph features like arc/edge or node deletion.
alpar@40
    42
alpar@40
    43
You are free to use the graph structure that fit your requirements
alpar@40
    44
the best, most graph algorithms and auxiliary data structures can be used
alpar@209
    45
with any graph structures.
alpar@40
    46
*/
alpar@40
    47
alpar@40
    48
/**
alpar@209
    49
@defgroup maps Maps
alpar@40
    50
@ingroup datas
kpeter@50
    51
\brief Map structures implemented in LEMON.
alpar@40
    52
kpeter@50
    53
This group describes the map structures implemented in LEMON.
kpeter@50
    54
kpeter@50
    55
LEMON provides several special purpose maps that e.g. combine
alpar@40
    56
new maps from existing ones.
alpar@40
    57
*/
alpar@40
    58
alpar@40
    59
/**
alpar@209
    60
@defgroup graph_maps Graph Maps
alpar@40
    61
@ingroup maps
kpeter@83
    62
\brief Special graph-related maps.
alpar@40
    63
kpeter@50
    64
This group describes maps that are specifically designed to assign
kpeter@83
    65
values to the nodes and arcs of graphs.
alpar@40
    66
*/
alpar@40
    67
alpar@40
    68
alpar@40
    69
/**
alpar@40
    70
\defgroup map_adaptors Map Adaptors
alpar@40
    71
\ingroup maps
alpar@40
    72
\brief Tools to create new maps from existing ones
alpar@40
    73
kpeter@50
    74
This group describes map adaptors that are used to create "implicit"
kpeter@50
    75
maps from other maps.
alpar@40
    76
kpeter@83
    77
Most of them are \ref lemon::concepts::ReadMap "read-only maps".
kpeter@83
    78
They can make arithmetic and logical operations between one or two maps
kpeter@83
    79
(negation, shifting, addition, multiplication, logical 'and', 'or',
kpeter@83
    80
'not' etc.) or e.g. convert a map to another one of different Value type.
alpar@40
    81
kpeter@50
    82
The typical usage of this classes is passing implicit maps to
alpar@40
    83
algorithms.  If a function type algorithm is called then the function
alpar@40
    84
type map adaptors can be used comfortable. For example let's see the
kpeter@83
    85
usage of map adaptors with the \c digraphToEps() function.
alpar@40
    86
\code
alpar@40
    87
  Color nodeColor(int deg) {
alpar@40
    88
    if (deg >= 2) {
alpar@40
    89
      return Color(0.5, 0.0, 0.5);
alpar@40
    90
    } else if (deg == 1) {
alpar@40
    91
      return Color(1.0, 0.5, 1.0);
alpar@40
    92
    } else {
alpar@40
    93
      return Color(0.0, 0.0, 0.0);
alpar@40
    94
    }
alpar@40
    95
  }
alpar@209
    96
kpeter@83
    97
  Digraph::NodeMap<int> degree_map(graph);
alpar@209
    98
kpeter@83
    99
  digraphToEps(graph, "graph.eps")
alpar@40
   100
    .coords(coords).scaleToA4().undirected()
kpeter@83
   101
    .nodeColors(composeMap(functorToMap(nodeColor), degree_map))
alpar@40
   102
    .run();
alpar@209
   103
\endcode
kpeter@83
   104
The \c functorToMap() function makes an \c int to \c Color map from the
alpar@40
   105
\e nodeColor() function. The \c composeMap() compose the \e degree_map
kpeter@83
   106
and the previously created map. The composed map is a proper function to
kpeter@83
   107
get the color of each node.
alpar@40
   108
alpar@40
   109
The usage with class type algorithms is little bit harder. In this
alpar@40
   110
case the function type map adaptors can not be used, because the
kpeter@50
   111
function map adaptors give back temporary objects.
alpar@40
   112
\code
kpeter@83
   113
  Digraph graph;
kpeter@83
   114
kpeter@83
   115
  typedef Digraph::ArcMap<double> DoubleArcMap;
kpeter@83
   116
  DoubleArcMap length(graph);
kpeter@83
   117
  DoubleArcMap speed(graph);
kpeter@83
   118
kpeter@83
   119
  typedef DivMap<DoubleArcMap, DoubleArcMap> TimeMap;
alpar@40
   120
  TimeMap time(length, speed);
alpar@209
   121
kpeter@83
   122
  Dijkstra<Digraph, TimeMap> dijkstra(graph, time);
alpar@40
   123
  dijkstra.run(source, target);
alpar@40
   124
\endcode
kpeter@83
   125
We have a length map and a maximum speed map on the arcs of a digraph.
kpeter@83
   126
The minimum time to pass the arc can be calculated as the division of
kpeter@83
   127
the two maps which can be done implicitly with the \c DivMap template
alpar@40
   128
class. We use the implicit minimum time map as the length map of the
alpar@40
   129
\c Dijkstra algorithm.
alpar@40
   130
*/
alpar@40
   131
alpar@40
   132
/**
alpar@40
   133
@defgroup paths Path Structures
alpar@40
   134
@ingroup datas
alpar@40
   135
\brief Path structures implemented in LEMON.
alpar@40
   136
kpeter@50
   137
This group describes the path structures implemented in LEMON.
alpar@40
   138
kpeter@50
   139
LEMON provides flexible data structures to work with paths.
kpeter@50
   140
All of them have similar interfaces and they can be copied easily with
kpeter@50
   141
assignment operators and copy constructors. This makes it easy and
alpar@40
   142
efficient to have e.g. the Dijkstra algorithm to store its result in
alpar@40
   143
any kind of path structure.
alpar@40
   144
alpar@40
   145
\sa lemon::concepts::Path
alpar@40
   146
alpar@40
   147
*/
alpar@40
   148
alpar@40
   149
/**
alpar@40
   150
@defgroup auxdat Auxiliary Data Structures
alpar@40
   151
@ingroup datas
kpeter@50
   152
\brief Auxiliary data structures implemented in LEMON.
alpar@40
   153
kpeter@50
   154
This group describes some data structures implemented in LEMON in
alpar@40
   155
order to make it easier to implement combinatorial algorithms.
alpar@40
   156
*/
alpar@40
   157
alpar@40
   158
alpar@40
   159
/**
alpar@40
   160
@defgroup algs Algorithms
alpar@40
   161
\brief This group describes the several algorithms
alpar@40
   162
implemented in LEMON.
alpar@40
   163
alpar@40
   164
This group describes the several algorithms
alpar@40
   165
implemented in LEMON.
alpar@40
   166
*/
alpar@40
   167
alpar@40
   168
/**
alpar@40
   169
@defgroup search Graph Search
alpar@40
   170
@ingroup algs
kpeter@50
   171
\brief Common graph search algorithms.
alpar@40
   172
alpar@209
   173
This group describes the common graph search algorithms like
kpeter@50
   174
Breadth-first search (Bfs) and Depth-first search (Dfs).
alpar@40
   175
*/
alpar@40
   176
alpar@40
   177
/**
alpar@40
   178
@defgroup shortest_path Shortest Path algorithms
alpar@40
   179
@ingroup algs
kpeter@50
   180
\brief Algorithms for finding shortest paths.
alpar@40
   181
kpeter@50
   182
This group describes the algorithms for finding shortest paths in graphs.
alpar@40
   183
*/
alpar@40
   184
alpar@209
   185
/**
alpar@40
   186
@defgroup spantree Minimum Spanning Tree algorithms
alpar@40
   187
@ingroup algs
kpeter@50
   188
\brief Algorithms for finding a minimum cost spanning tree in a graph.
alpar@40
   189
kpeter@50
   190
This group describes the algorithms for finding a minimum cost spanning
alpar@40
   191
tree in a graph
alpar@40
   192
*/
alpar@40
   193
alpar@40
   194
/**
alpar@209
   195
@defgroup utils Tools and Utilities
kpeter@50
   196
\brief Tools and utilities for programming in LEMON
alpar@40
   197
kpeter@50
   198
Tools and utilities for programming in LEMON.
alpar@40
   199
*/
alpar@40
   200
alpar@40
   201
/**
alpar@40
   202
@defgroup gutils Basic Graph Utilities
alpar@40
   203
@ingroup utils
kpeter@50
   204
\brief Simple basic graph utilities.
alpar@40
   205
alpar@40
   206
This group describes some simple basic graph utilities.
alpar@40
   207
*/
alpar@40
   208
alpar@40
   209
/**
alpar@40
   210
@defgroup misc Miscellaneous Tools
alpar@40
   211
@ingroup utils
kpeter@50
   212
\brief Tools for development, debugging and testing.
kpeter@50
   213
kpeter@50
   214
This group describes several useful tools for development,
alpar@40
   215
debugging and testing.
alpar@40
   216
*/
alpar@40
   217
alpar@40
   218
/**
alpar@40
   219
@defgroup timecount Time measuring and Counting
alpar@40
   220
@ingroup misc
kpeter@50
   221
\brief Simple tools for measuring the performance of algorithms.
kpeter@50
   222
kpeter@50
   223
This group describes simple tools for measuring the performance
alpar@40
   224
of algorithms.
alpar@40
   225
*/
alpar@40
   226
alpar@40
   227
/**
alpar@40
   228
@defgroup exceptions Exceptions
alpar@40
   229
@ingroup utils
kpeter@50
   230
\brief Exceptions defined in LEMON.
kpeter@50
   231
kpeter@50
   232
This group describes the exceptions defined in LEMON.
alpar@40
   233
*/
alpar@40
   234
alpar@40
   235
/**
alpar@40
   236
@defgroup io_group Input-Output
kpeter@50
   237
\brief Graph Input-Output methods
alpar@40
   238
alpar@209
   239
This group describes the tools for importing and exporting graphs
kpeter@302
   240
and graph related data. Now it supports the LEMON format
kpeter@302
   241
and the encapsulated postscript (EPS) format.
alpar@40
   242
*/
alpar@40
   243
alpar@40
   244
/**
ladanyi@236
   245
@defgroup lemon_io LEMON Input-Output
alpar@40
   246
@ingroup io_group
ladanyi@236
   247
\brief Reading and writing \ref lgf-format "LEMON Graph Format".
alpar@40
   248
alpar@210
   249
This group describes methods for reading and writing
ladanyi@236
   250
\ref lgf-format "LEMON Graph Format".
alpar@40
   251
*/
alpar@40
   252
alpar@40
   253
/**
alpar@40
   254
@defgroup eps_io Postscript exporting
alpar@40
   255
@ingroup io_group
alpar@40
   256
\brief General \c EPS drawer and graph exporter
alpar@40
   257
kpeter@50
   258
This group describes general \c EPS drawing methods and special
alpar@209
   259
graph exporting tools.
alpar@40
   260
*/
alpar@40
   261
alpar@40
   262
alpar@40
   263
/**
alpar@40
   264
@defgroup concept Concepts
alpar@40
   265
\brief Skeleton classes and concept checking classes
alpar@40
   266
alpar@40
   267
This group describes the data/algorithm skeletons and concept checking
alpar@40
   268
classes implemented in LEMON.
alpar@40
   269
alpar@40
   270
The purpose of the classes in this group is fourfold.
alpar@209
   271
alpar@40
   272
- These classes contain the documentations of the concepts. In order
alpar@40
   273
  to avoid document multiplications, an implementation of a concept
alpar@40
   274
  simply refers to the corresponding concept class.
alpar@40
   275
alpar@40
   276
- These classes declare every functions, <tt>typedef</tt>s etc. an
alpar@40
   277
  implementation of the concepts should provide, however completely
alpar@40
   278
  without implementations and real data structures behind the
alpar@40
   279
  interface. On the other hand they should provide nothing else. All
alpar@40
   280
  the algorithms working on a data structure meeting a certain concept
alpar@40
   281
  should compile with these classes. (Though it will not run properly,
alpar@40
   282
  of course.) In this way it is easily to check if an algorithm
alpar@40
   283
  doesn't use any extra feature of a certain implementation.
alpar@40
   284
alpar@40
   285
- The concept descriptor classes also provide a <em>checker class</em>
kpeter@50
   286
  that makes it possible to check whether a certain implementation of a
alpar@40
   287
  concept indeed provides all the required features.
alpar@40
   288
alpar@40
   289
- Finally, They can serve as a skeleton of a new implementation of a concept.
alpar@40
   290
alpar@40
   291
*/
alpar@40
   292
alpar@40
   293
alpar@40
   294
/**
alpar@40
   295
@defgroup graph_concepts Graph Structure Concepts
alpar@40
   296
@ingroup concept
alpar@40
   297
\brief Skeleton and concept checking classes for graph structures
alpar@40
   298
kpeter@50
   299
This group describes the skeletons and concept checking classes of LEMON's
alpar@40
   300
graph structures and helper classes used to implement these.
alpar@40
   301
*/
alpar@40
   302
alpar@40
   303
/**
alpar@40
   304
\anchor demoprograms
alpar@40
   305
alpar@40
   306
@defgroup demos Demo programs
alpar@40
   307
alpar@40
   308
Some demo programs are listed here. Their full source codes can be found in
alpar@40
   309
the \c demo subdirectory of the source tree.
alpar@40
   310
alpar@41
   311
It order to compile them, use <tt>--enable-demo</tt> configure option when
alpar@41
   312
build the library.
alpar@40
   313
*/