[209] | 1 | /* -*- mode: C++; indent-tabs-mode: nil; -*- |
---|
[40] | 2 | * |
---|
[209] | 3 | * This file is a part of LEMON, a generic C++ optimization library. |
---|
[40] | 4 | * |
---|
| 5 | * Copyright (C) 2003-2008 |
---|
| 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 |
---|
[50] | 21 | This group describes the several data structures implemented in LEMON. |
---|
[40] | 22 | */ |
---|
| 23 | |
---|
| 24 | /** |
---|
| 25 | @defgroup graphs Graph Structures |
---|
| 26 | @ingroup datas |
---|
| 27 | \brief Graph structures implemented in LEMON. |
---|
| 28 | |
---|
[209] | 29 | The implementation of combinatorial algorithms heavily relies on |
---|
| 30 | efficient graph implementations. LEMON offers data structures which are |
---|
| 31 | planned to be easily used in an experimental phase of implementation studies, |
---|
| 32 | and thereafter the program code can be made efficient by small modifications. |
---|
[40] | 33 | |
---|
| 34 | The most efficient implementation of diverse applications require the |
---|
| 35 | usage of different physical graph implementations. These differences |
---|
| 36 | appear in the size of graph we require to handle, memory or time usage |
---|
| 37 | limitations or in the set of operations through which the graph can be |
---|
| 38 | accessed. LEMON provides several physical graph structures to meet |
---|
| 39 | the diverging requirements of the possible users. In order to save on |
---|
| 40 | running time or on memory usage, some structures may fail to provide |
---|
[83] | 41 | some graph features like arc/edge or node deletion. |
---|
[40] | 42 | |
---|
[209] | 43 | Alteration of standard containers need a very limited number of |
---|
| 44 | operations, these together satisfy the everyday requirements. |
---|
| 45 | In the case of graph structures, different operations are needed which do |
---|
| 46 | not alter the physical graph, but gives another view. If some nodes or |
---|
[83] | 47 | arcs have to be hidden or the reverse oriented graph have to be used, then |
---|
[209] | 48 | this is the case. It also may happen that in a flow implementation |
---|
| 49 | the residual graph can be accessed by another algorithm, or a node-set |
---|
| 50 | is to be shrunk for another algorithm. |
---|
| 51 | LEMON also provides a variety of graphs for these requirements called |
---|
| 52 | \ref graph_adaptors "graph adaptors". Adaptors cannot be used alone but only |
---|
| 53 | in conjunction with other graph representations. |
---|
[40] | 54 | |
---|
| 55 | You are free to use the graph structure that fit your requirements |
---|
| 56 | the best, most graph algorithms and auxiliary data structures can be used |
---|
[314] | 57 | with any graph structure. |
---|
| 58 | |
---|
| 59 | <b>See also:</b> \ref graph_concepts "Graph Structure Concepts". |
---|
[40] | 60 | */ |
---|
| 61 | |
---|
| 62 | /** |
---|
[416] | 63 | @defgroup graph_adaptors Adaptor Classes for graphs |
---|
| 64 | @ingroup graphs |
---|
| 65 | \brief This group contains several adaptor classes for digraphs and graphs |
---|
| 66 | |
---|
| 67 | The main parts of LEMON are the different graph structures, generic |
---|
| 68 | graph algorithms, graph concepts which couple these, and graph |
---|
| 69 | adaptors. While the previous notions are more or less clear, the |
---|
| 70 | latter one needs further explanation. Graph adaptors are graph classes |
---|
| 71 | which serve for considering graph structures in different ways. |
---|
| 72 | |
---|
| 73 | A short example makes this much clearer. Suppose that we have an |
---|
| 74 | instance \c g of a directed graph type say ListDigraph and an algorithm |
---|
| 75 | \code |
---|
| 76 | template <typename Digraph> |
---|
| 77 | int algorithm(const Digraph&); |
---|
| 78 | \endcode |
---|
| 79 | is needed to run on the reverse oriented graph. It may be expensive |
---|
| 80 | (in time or in memory usage) to copy \c g with the reversed |
---|
| 81 | arcs. In this case, an adaptor class is used, which (according |
---|
| 82 | to LEMON digraph concepts) works as a digraph. The adaptor uses the |
---|
| 83 | original digraph structure and digraph operations when methods of the |
---|
| 84 | reversed oriented graph are called. This means that the adaptor have |
---|
| 85 | minor memory usage, and do not perform sophisticated algorithmic |
---|
| 86 | actions. The purpose of it is to give a tool for the cases when a |
---|
| 87 | graph have to be used in a specific alteration. If this alteration is |
---|
| 88 | obtained by a usual construction like filtering the arc-set or |
---|
| 89 | considering a new orientation, then an adaptor is worthwhile to use. |
---|
| 90 | To come back to the reverse oriented graph, in this situation |
---|
| 91 | \code |
---|
| 92 | template<typename Digraph> class ReverseDigraph; |
---|
| 93 | \endcode |
---|
| 94 | template class can be used. The code looks as follows |
---|
| 95 | \code |
---|
| 96 | ListDigraph g; |
---|
| 97 | ReverseDigraph<ListGraph> rg(g); |
---|
| 98 | int result = algorithm(rg); |
---|
| 99 | \endcode |
---|
| 100 | After running the algorithm, the original graph \c g is untouched. |
---|
| 101 | This techniques gives rise to an elegant code, and based on stable |
---|
| 102 | graph adaptors, complex algorithms can be implemented easily. |
---|
| 103 | |
---|
| 104 | In flow, circulation and bipartite matching problems, the residual |
---|
| 105 | graph is of particular importance. Combining an adaptor implementing |
---|
| 106 | this, shortest path algorithms and minimum mean cycle algorithms, |
---|
| 107 | a range of weighted and cardinality optimization algorithms can be |
---|
| 108 | obtained. For other examples, the interested user is referred to the |
---|
| 109 | detailed documentation of particular adaptors. |
---|
| 110 | |
---|
| 111 | The behavior of graph adaptors can be very different. Some of them keep |
---|
| 112 | capabilities of the original graph while in other cases this would be |
---|
| 113 | meaningless. This means that the concepts that they are models of depend |
---|
| 114 | on the graph adaptor, and the wrapped graph(s). |
---|
| 115 | If an arc of \c rg is deleted, this is carried out by deleting the |
---|
| 116 | corresponding arc of \c g, thus the adaptor modifies the original graph. |
---|
| 117 | |
---|
| 118 | But for a residual graph, this operation has no sense. |
---|
| 119 | Let us stand one more example here to simplify your work. |
---|
| 120 | RevGraphAdaptor has constructor |
---|
| 121 | \code |
---|
| 122 | ReverseDigraph(Digraph& digraph); |
---|
| 123 | \endcode |
---|
| 124 | This means that in a situation, when a <tt>const ListDigraph&</tt> |
---|
| 125 | reference to a graph is given, then it have to be instantiated with |
---|
| 126 | <tt>Digraph=const ListDigraph</tt>. |
---|
| 127 | \code |
---|
| 128 | int algorithm1(const ListDigraph& g) { |
---|
| 129 | RevGraphAdaptor<const ListDigraph> rg(g); |
---|
| 130 | return algorithm2(rg); |
---|
| 131 | } |
---|
| 132 | \endcode |
---|
| 133 | */ |
---|
| 134 | |
---|
| 135 | /** |
---|
[50] | 136 | @defgroup semi_adaptors Semi-Adaptor Classes for Graphs |
---|
[40] | 137 | @ingroup graphs |
---|
| 138 | \brief Graph types between real graphs and graph adaptors. |
---|
| 139 | |
---|
[50] | 140 | This group describes some graph types between real graphs and graph adaptors. |
---|
[209] | 141 | These classes wrap graphs to give new functionality as the adaptors do it. |
---|
[50] | 142 | On the other hand they are not light-weight structures as the adaptors. |
---|
[40] | 143 | */ |
---|
| 144 | |
---|
| 145 | /** |
---|
[209] | 146 | @defgroup maps Maps |
---|
[40] | 147 | @ingroup datas |
---|
[50] | 148 | \brief Map structures implemented in LEMON. |
---|
[40] | 149 | |
---|
[50] | 150 | This group describes the map structures implemented in LEMON. |
---|
| 151 | |
---|
[314] | 152 | LEMON provides several special purpose maps and map adaptors that e.g. combine |
---|
[40] | 153 | new maps from existing ones. |
---|
[314] | 154 | |
---|
| 155 | <b>See also:</b> \ref map_concepts "Map Concepts". |
---|
[40] | 156 | */ |
---|
| 157 | |
---|
| 158 | /** |
---|
[209] | 159 | @defgroup graph_maps Graph Maps |
---|
[40] | 160 | @ingroup maps |
---|
[83] | 161 | \brief Special graph-related maps. |
---|
[40] | 162 | |
---|
[50] | 163 | This group describes maps that are specifically designed to assign |
---|
[83] | 164 | values to the nodes and arcs of graphs. |
---|
[40] | 165 | */ |
---|
| 166 | |
---|
| 167 | /** |
---|
| 168 | \defgroup map_adaptors Map Adaptors |
---|
| 169 | \ingroup maps |
---|
| 170 | \brief Tools to create new maps from existing ones |
---|
| 171 | |
---|
[50] | 172 | This group describes map adaptors that are used to create "implicit" |
---|
| 173 | maps from other maps. |
---|
[40] | 174 | |
---|
[83] | 175 | Most of them are \ref lemon::concepts::ReadMap "read-only maps". |
---|
| 176 | They can make arithmetic and logical operations between one or two maps |
---|
| 177 | (negation, shifting, addition, multiplication, logical 'and', 'or', |
---|
| 178 | 'not' etc.) or e.g. convert a map to another one of different Value type. |
---|
[40] | 179 | |
---|
[50] | 180 | The typical usage of this classes is passing implicit maps to |
---|
[40] | 181 | algorithms. If a function type algorithm is called then the function |
---|
| 182 | type map adaptors can be used comfortable. For example let's see the |
---|
[314] | 183 | usage of map adaptors with the \c graphToEps() function. |
---|
[40] | 184 | \code |
---|
| 185 | Color nodeColor(int deg) { |
---|
| 186 | if (deg >= 2) { |
---|
| 187 | return Color(0.5, 0.0, 0.5); |
---|
| 188 | } else if (deg == 1) { |
---|
| 189 | return Color(1.0, 0.5, 1.0); |
---|
| 190 | } else { |
---|
| 191 | return Color(0.0, 0.0, 0.0); |
---|
| 192 | } |
---|
| 193 | } |
---|
[209] | 194 | |
---|
[83] | 195 | Digraph::NodeMap<int> degree_map(graph); |
---|
[209] | 196 | |
---|
[314] | 197 | graphToEps(graph, "graph.eps") |
---|
[40] | 198 | .coords(coords).scaleToA4().undirected() |
---|
[83] | 199 | .nodeColors(composeMap(functorToMap(nodeColor), degree_map)) |
---|
[40] | 200 | .run(); |
---|
[209] | 201 | \endcode |
---|
[83] | 202 | The \c functorToMap() function makes an \c int to \c Color map from the |
---|
[314] | 203 | \c nodeColor() function. The \c composeMap() compose the \c degree_map |
---|
[83] | 204 | and the previously created map. The composed map is a proper function to |
---|
| 205 | get the color of each node. |
---|
[40] | 206 | |
---|
| 207 | The usage with class type algorithms is little bit harder. In this |
---|
| 208 | case the function type map adaptors can not be used, because the |
---|
[50] | 209 | function map adaptors give back temporary objects. |
---|
[40] | 210 | \code |
---|
[83] | 211 | Digraph graph; |
---|
| 212 | |
---|
| 213 | typedef Digraph::ArcMap<double> DoubleArcMap; |
---|
| 214 | DoubleArcMap length(graph); |
---|
| 215 | DoubleArcMap speed(graph); |
---|
| 216 | |
---|
| 217 | typedef DivMap<DoubleArcMap, DoubleArcMap> TimeMap; |
---|
[40] | 218 | TimeMap time(length, speed); |
---|
[209] | 219 | |
---|
[83] | 220 | Dijkstra<Digraph, TimeMap> dijkstra(graph, time); |
---|
[40] | 221 | dijkstra.run(source, target); |
---|
| 222 | \endcode |
---|
[83] | 223 | We have a length map and a maximum speed map on the arcs of a digraph. |
---|
| 224 | The minimum time to pass the arc can be calculated as the division of |
---|
| 225 | the two maps which can be done implicitly with the \c DivMap template |
---|
[40] | 226 | class. We use the implicit minimum time map as the length map of the |
---|
| 227 | \c Dijkstra algorithm. |
---|
| 228 | */ |
---|
| 229 | |
---|
| 230 | /** |
---|
[209] | 231 | @defgroup matrices Matrices |
---|
[40] | 232 | @ingroup datas |
---|
[50] | 233 | \brief Two dimensional data storages implemented in LEMON. |
---|
[40] | 234 | |
---|
[50] | 235 | This group describes two dimensional data storages implemented in LEMON. |
---|
[40] | 236 | */ |
---|
| 237 | |
---|
| 238 | /** |
---|
| 239 | @defgroup paths Path Structures |
---|
| 240 | @ingroup datas |
---|
[318] | 241 | \brief %Path structures implemented in LEMON. |
---|
[40] | 242 | |
---|
[50] | 243 | This group describes the path structures implemented in LEMON. |
---|
[40] | 244 | |
---|
[50] | 245 | LEMON provides flexible data structures to work with paths. |
---|
| 246 | All of them have similar interfaces and they can be copied easily with |
---|
| 247 | assignment operators and copy constructors. This makes it easy and |
---|
[40] | 248 | efficient to have e.g. the Dijkstra algorithm to store its result in |
---|
| 249 | any kind of path structure. |
---|
| 250 | |
---|
| 251 | \sa lemon::concepts::Path |
---|
| 252 | */ |
---|
| 253 | |
---|
| 254 | /** |
---|
| 255 | @defgroup auxdat Auxiliary Data Structures |
---|
| 256 | @ingroup datas |
---|
[50] | 257 | \brief Auxiliary data structures implemented in LEMON. |
---|
[40] | 258 | |
---|
[50] | 259 | This group describes some data structures implemented in LEMON in |
---|
[40] | 260 | order to make it easier to implement combinatorial algorithms. |
---|
| 261 | */ |
---|
| 262 | |
---|
| 263 | /** |
---|
| 264 | @defgroup algs Algorithms |
---|
| 265 | \brief This group describes the several algorithms |
---|
| 266 | implemented in LEMON. |
---|
| 267 | |
---|
| 268 | This group describes the several algorithms |
---|
| 269 | implemented in LEMON. |
---|
| 270 | */ |
---|
| 271 | |
---|
| 272 | /** |
---|
| 273 | @defgroup search Graph Search |
---|
| 274 | @ingroup algs |
---|
[50] | 275 | \brief Common graph search algorithms. |
---|
[40] | 276 | |
---|
[209] | 277 | This group describes the common graph search algorithms like |
---|
[314] | 278 | Breadth-First Search (BFS) and Depth-First Search (DFS). |
---|
[40] | 279 | */ |
---|
| 280 | |
---|
| 281 | /** |
---|
[314] | 282 | @defgroup shortest_path Shortest Path Algorithms |
---|
[40] | 283 | @ingroup algs |
---|
[50] | 284 | \brief Algorithms for finding shortest paths. |
---|
[40] | 285 | |
---|
[50] | 286 | This group describes the algorithms for finding shortest paths in graphs. |
---|
[40] | 287 | */ |
---|
| 288 | |
---|
[209] | 289 | /** |
---|
[314] | 290 | @defgroup max_flow Maximum Flow Algorithms |
---|
[209] | 291 | @ingroup algs |
---|
[50] | 292 | \brief Algorithms for finding maximum flows. |
---|
[40] | 293 | |
---|
| 294 | This group describes the algorithms for finding maximum flows and |
---|
| 295 | feasible circulations. |
---|
| 296 | |
---|
[50] | 297 | The maximum flow problem is to find a flow between a single source and |
---|
| 298 | a single target that is maximum. Formally, there is a \f$G=(V,A)\f$ |
---|
[40] | 299 | directed graph, an \f$c_a:A\rightarrow\mathbf{R}^+_0\f$ capacity |
---|
| 300 | function and given \f$s, t \in V\f$ source and target node. The |
---|
[50] | 301 | maximum flow is the \f$f_a\f$ solution of the next optimization problem: |
---|
[40] | 302 | |
---|
| 303 | \f[ 0 \le f_a \le c_a \f] |
---|
[210] | 304 | \f[ \sum_{v\in\delta^{-}(u)}f_{vu}=\sum_{v\in\delta^{+}(u)}f_{uv} |
---|
| 305 | \qquad \forall u \in V \setminus \{s,t\}\f] |
---|
[40] | 306 | \f[ \max \sum_{v\in\delta^{+}(s)}f_{uv} - \sum_{v\in\delta^{-}(s)}f_{vu}\f] |
---|
| 307 | |
---|
[50] | 308 | LEMON contains several algorithms for solving maximum flow problems: |
---|
[209] | 309 | - \ref lemon::EdmondsKarp "Edmonds-Karp" |
---|
[40] | 310 | - \ref lemon::Preflow "Goldberg's Preflow algorithm" |
---|
[50] | 311 | - \ref lemon::DinitzSleatorTarjan "Dinitz's blocking flow algorithm with dynamic trees" |
---|
[40] | 312 | - \ref lemon::GoldbergTarjan "Preflow algorithm with dynamic trees" |
---|
| 313 | |
---|
[50] | 314 | In most cases the \ref lemon::Preflow "Preflow" algorithm provides the |
---|
[40] | 315 | fastest method to compute the maximum flow. All impelementations |
---|
[50] | 316 | provides functions to query the minimum cut, which is the dual linear |
---|
| 317 | programming problem of the maximum flow. |
---|
[40] | 318 | */ |
---|
| 319 | |
---|
| 320 | /** |
---|
[314] | 321 | @defgroup min_cost_flow Minimum Cost Flow Algorithms |
---|
[40] | 322 | @ingroup algs |
---|
| 323 | |
---|
[50] | 324 | \brief Algorithms for finding minimum cost flows and circulations. |
---|
[40] | 325 | |
---|
| 326 | This group describes the algorithms for finding minimum cost flows and |
---|
[209] | 327 | circulations. |
---|
[40] | 328 | */ |
---|
| 329 | |
---|
| 330 | /** |
---|
[314] | 331 | @defgroup min_cut Minimum Cut Algorithms |
---|
[209] | 332 | @ingroup algs |
---|
[40] | 333 | |
---|
[50] | 334 | \brief Algorithms for finding minimum cut in graphs. |
---|
[40] | 335 | |
---|
| 336 | This group describes the algorithms for finding minimum cut in graphs. |
---|
| 337 | |
---|
| 338 | The minimum cut problem is to find a non-empty and non-complete |
---|
| 339 | \f$X\f$ subset of the vertices with minimum overall capacity on |
---|
| 340 | outgoing arcs. Formally, there is \f$G=(V,A)\f$ directed graph, an |
---|
| 341 | \f$c_a:A\rightarrow\mathbf{R}^+_0\f$ capacity function. The minimum |
---|
[50] | 342 | cut is the \f$X\f$ solution of the next optimization problem: |
---|
[40] | 343 | |
---|
[210] | 344 | \f[ \min_{X \subset V, X\not\in \{\emptyset, V\}} |
---|
| 345 | \sum_{uv\in A, u\in X, v\not\in X}c_{uv}\f] |
---|
[40] | 346 | |
---|
[50] | 347 | LEMON contains several algorithms related to minimum cut problems: |
---|
[40] | 348 | |
---|
[50] | 349 | - \ref lemon::HaoOrlin "Hao-Orlin algorithm" to calculate minimum cut |
---|
[209] | 350 | in directed graphs |
---|
[50] | 351 | - \ref lemon::NagamochiIbaraki "Nagamochi-Ibaraki algorithm" to |
---|
[40] | 352 | calculate minimum cut in undirected graphs |
---|
[50] | 353 | - \ref lemon::GomoryHuTree "Gomory-Hu tree computation" to calculate all |
---|
[40] | 354 | pairs minimum cut in undirected graphs |
---|
| 355 | |
---|
| 356 | If you want to find minimum cut just between two distinict nodes, |
---|
| 357 | please see the \ref max_flow "Maximum Flow page". |
---|
| 358 | */ |
---|
| 359 | |
---|
| 360 | /** |
---|
[314] | 361 | @defgroup graph_prop Connectivity and Other Graph Properties |
---|
[40] | 362 | @ingroup algs |
---|
[50] | 363 | \brief Algorithms for discovering the graph properties |
---|
[40] | 364 | |
---|
[50] | 365 | This group describes the algorithms for discovering the graph properties |
---|
| 366 | like connectivity, bipartiteness, euler property, simplicity etc. |
---|
[40] | 367 | |
---|
| 368 | \image html edge_biconnected_components.png |
---|
| 369 | \image latex edge_biconnected_components.eps "bi-edge-connected components" width=\textwidth |
---|
| 370 | */ |
---|
| 371 | |
---|
| 372 | /** |
---|
[314] | 373 | @defgroup planar Planarity Embedding and Drawing |
---|
[40] | 374 | @ingroup algs |
---|
[50] | 375 | \brief Algorithms for planarity checking, embedding and drawing |
---|
[40] | 376 | |
---|
[210] | 377 | This group describes the algorithms for planarity checking, |
---|
| 378 | embedding and drawing. |
---|
[40] | 379 | |
---|
| 380 | \image html planar.png |
---|
| 381 | \image latex planar.eps "Plane graph" width=\textwidth |
---|
| 382 | */ |
---|
| 383 | |
---|
| 384 | /** |
---|
[314] | 385 | @defgroup matching Matching Algorithms |
---|
[40] | 386 | @ingroup algs |
---|
[50] | 387 | \brief Algorithms for finding matchings in graphs and bipartite graphs. |
---|
[40] | 388 | |
---|
[50] | 389 | This group contains algorithm objects and functions to calculate |
---|
[40] | 390 | matchings in graphs and bipartite graphs. The general matching problem is |
---|
[83] | 391 | finding a subset of the arcs which does not shares common endpoints. |
---|
[209] | 392 | |
---|
[40] | 393 | There are several different algorithms for calculate matchings in |
---|
| 394 | graphs. The matching problems in bipartite graphs are generally |
---|
| 395 | easier than in general graphs. The goal of the matching optimization |
---|
| 396 | can be the finding maximum cardinality, maximum weight or minimum cost |
---|
| 397 | matching. The search can be constrained to find perfect or |
---|
| 398 | maximum cardinality matching. |
---|
| 399 | |
---|
[236] | 400 | LEMON contains the next algorithms: |
---|
[209] | 401 | - \ref lemon::MaxBipartiteMatching "MaxBipartiteMatching" Hopcroft-Karp |
---|
| 402 | augmenting path algorithm for calculate maximum cardinality matching in |
---|
[40] | 403 | bipartite graphs |
---|
[209] | 404 | - \ref lemon::PrBipartiteMatching "PrBipartiteMatching" Push-Relabel |
---|
| 405 | algorithm for calculate maximum cardinality matching in bipartite graphs |
---|
| 406 | - \ref lemon::MaxWeightedBipartiteMatching "MaxWeightedBipartiteMatching" |
---|
| 407 | Successive shortest path algorithm for calculate maximum weighted matching |
---|
[40] | 408 | and maximum weighted bipartite matching in bipartite graph |
---|
[209] | 409 | - \ref lemon::MinCostMaxBipartiteMatching "MinCostMaxBipartiteMatching" |
---|
| 410 | Successive shortest path algorithm for calculate minimum cost maximum |
---|
[40] | 411 | matching in bipartite graph |
---|
| 412 | - \ref lemon::MaxMatching "MaxMatching" Edmond's blossom shrinking algorithm |
---|
| 413 | for calculate maximum cardinality matching in general graph |
---|
| 414 | - \ref lemon::MaxWeightedMatching "MaxWeightedMatching" Edmond's blossom |
---|
| 415 | shrinking algorithm for calculate maximum weighted matching in general |
---|
| 416 | graph |
---|
| 417 | - \ref lemon::MaxWeightedPerfectMatching "MaxWeightedPerfectMatching" |
---|
| 418 | Edmond's blossom shrinking algorithm for calculate maximum weighted |
---|
| 419 | perfect matching in general graph |
---|
| 420 | |
---|
| 421 | \image html bipartite_matching.png |
---|
| 422 | \image latex bipartite_matching.eps "Bipartite Matching" width=\textwidth |
---|
| 423 | */ |
---|
| 424 | |
---|
| 425 | /** |
---|
[314] | 426 | @defgroup spantree Minimum Spanning Tree Algorithms |
---|
[40] | 427 | @ingroup algs |
---|
[50] | 428 | \brief Algorithms for finding a minimum cost spanning tree in a graph. |
---|
[40] | 429 | |
---|
[50] | 430 | This group describes the algorithms for finding a minimum cost spanning |
---|
[40] | 431 | tree in a graph |
---|
| 432 | */ |
---|
| 433 | |
---|
| 434 | /** |
---|
[314] | 435 | @defgroup auxalg Auxiliary Algorithms |
---|
[40] | 436 | @ingroup algs |
---|
[50] | 437 | \brief Auxiliary algorithms implemented in LEMON. |
---|
[40] | 438 | |
---|
[50] | 439 | This group describes some algorithms implemented in LEMON |
---|
| 440 | in order to make it easier to implement complex algorithms. |
---|
[40] | 441 | */ |
---|
| 442 | |
---|
| 443 | /** |
---|
[314] | 444 | @defgroup approx Approximation Algorithms |
---|
| 445 | @ingroup algs |
---|
[50] | 446 | \brief Approximation algorithms. |
---|
[40] | 447 | |
---|
[50] | 448 | This group describes the approximation and heuristic algorithms |
---|
| 449 | implemented in LEMON. |
---|
[40] | 450 | */ |
---|
| 451 | |
---|
| 452 | /** |
---|
| 453 | @defgroup gen_opt_group General Optimization Tools |
---|
| 454 | \brief This group describes some general optimization frameworks |
---|
| 455 | implemented in LEMON. |
---|
| 456 | |
---|
| 457 | This group describes some general optimization frameworks |
---|
| 458 | implemented in LEMON. |
---|
| 459 | */ |
---|
| 460 | |
---|
| 461 | /** |
---|
[314] | 462 | @defgroup lp_group Lp and Mip Solvers |
---|
[40] | 463 | @ingroup gen_opt_group |
---|
| 464 | \brief Lp and Mip solver interfaces for LEMON. |
---|
| 465 | |
---|
| 466 | This group describes Lp and Mip solver interfaces for LEMON. The |
---|
| 467 | various LP solvers could be used in the same manner with this |
---|
| 468 | interface. |
---|
| 469 | */ |
---|
| 470 | |
---|
[209] | 471 | /** |
---|
[314] | 472 | @defgroup lp_utils Tools for Lp and Mip Solvers |
---|
[40] | 473 | @ingroup lp_group |
---|
[50] | 474 | \brief Helper tools to the Lp and Mip solvers. |
---|
[40] | 475 | |
---|
| 476 | This group adds some helper tools to general optimization framework |
---|
| 477 | implemented in LEMON. |
---|
| 478 | */ |
---|
| 479 | |
---|
| 480 | /** |
---|
| 481 | @defgroup metah Metaheuristics |
---|
| 482 | @ingroup gen_opt_group |
---|
| 483 | \brief Metaheuristics for LEMON library. |
---|
| 484 | |
---|
[50] | 485 | This group describes some metaheuristic optimization tools. |
---|
[40] | 486 | */ |
---|
| 487 | |
---|
| 488 | /** |
---|
[209] | 489 | @defgroup utils Tools and Utilities |
---|
[50] | 490 | \brief Tools and utilities for programming in LEMON |
---|
[40] | 491 | |
---|
[50] | 492 | Tools and utilities for programming in LEMON. |
---|
[40] | 493 | */ |
---|
| 494 | |
---|
| 495 | /** |
---|
| 496 | @defgroup gutils Basic Graph Utilities |
---|
| 497 | @ingroup utils |
---|
[50] | 498 | \brief Simple basic graph utilities. |
---|
[40] | 499 | |
---|
| 500 | This group describes some simple basic graph utilities. |
---|
| 501 | */ |
---|
| 502 | |
---|
| 503 | /** |
---|
| 504 | @defgroup misc Miscellaneous Tools |
---|
| 505 | @ingroup utils |
---|
[50] | 506 | \brief Tools for development, debugging and testing. |
---|
| 507 | |
---|
| 508 | This group describes several useful tools for development, |
---|
[40] | 509 | debugging and testing. |
---|
| 510 | */ |
---|
| 511 | |
---|
| 512 | /** |
---|
[314] | 513 | @defgroup timecount Time Measuring and Counting |
---|
[40] | 514 | @ingroup misc |
---|
[50] | 515 | \brief Simple tools for measuring the performance of algorithms. |
---|
| 516 | |
---|
| 517 | This group describes simple tools for measuring the performance |
---|
[40] | 518 | of algorithms. |
---|
| 519 | */ |
---|
| 520 | |
---|
| 521 | /** |
---|
| 522 | @defgroup exceptions Exceptions |
---|
| 523 | @ingroup utils |
---|
[50] | 524 | \brief Exceptions defined in LEMON. |
---|
| 525 | |
---|
| 526 | This group describes the exceptions defined in LEMON. |
---|
[40] | 527 | */ |
---|
| 528 | |
---|
| 529 | /** |
---|
| 530 | @defgroup io_group Input-Output |
---|
[50] | 531 | \brief Graph Input-Output methods |
---|
[40] | 532 | |
---|
[209] | 533 | This group describes the tools for importing and exporting graphs |
---|
[314] | 534 | and graph related data. Now it supports the \ref lgf-format |
---|
| 535 | "LEMON Graph Format", the \c DIMACS format and the encapsulated |
---|
| 536 | postscript (EPS) format. |
---|
[40] | 537 | */ |
---|
| 538 | |
---|
| 539 | /** |
---|
[351] | 540 | @defgroup lemon_io LEMON Graph Format |
---|
[40] | 541 | @ingroup io_group |
---|
[314] | 542 | \brief Reading and writing LEMON Graph Format. |
---|
[40] | 543 | |
---|
[210] | 544 | This group describes methods for reading and writing |
---|
[236] | 545 | \ref lgf-format "LEMON Graph Format". |
---|
[40] | 546 | */ |
---|
| 547 | |
---|
| 548 | /** |
---|
[314] | 549 | @defgroup eps_io Postscript Exporting |
---|
[40] | 550 | @ingroup io_group |
---|
| 551 | \brief General \c EPS drawer and graph exporter |
---|
| 552 | |
---|
[50] | 553 | This group describes general \c EPS drawing methods and special |
---|
[209] | 554 | graph exporting tools. |
---|
[40] | 555 | */ |
---|
| 556 | |
---|
| 557 | /** |
---|
[388] | 558 | @defgroup dimacs_group DIMACS format |
---|
| 559 | @ingroup io_group |
---|
| 560 | \brief Read and write files in DIMACS format |
---|
| 561 | |
---|
| 562 | Tools to read a digraph from or write it to a file in DIMACS format data. |
---|
| 563 | */ |
---|
| 564 | |
---|
| 565 | /** |
---|
[351] | 566 | @defgroup nauty_group NAUTY Format |
---|
| 567 | @ingroup io_group |
---|
| 568 | \brief Read \e Nauty format |
---|
[388] | 569 | |
---|
[351] | 570 | Tool to read graphs from \e Nauty format data. |
---|
| 571 | */ |
---|
| 572 | |
---|
| 573 | /** |
---|
[40] | 574 | @defgroup concept Concepts |
---|
| 575 | \brief Skeleton classes and concept checking classes |
---|
| 576 | |
---|
| 577 | This group describes the data/algorithm skeletons and concept checking |
---|
| 578 | classes implemented in LEMON. |
---|
| 579 | |
---|
| 580 | The purpose of the classes in this group is fourfold. |
---|
[209] | 581 | |
---|
[318] | 582 | - These classes contain the documentations of the %concepts. In order |
---|
[40] | 583 | to avoid document multiplications, an implementation of a concept |
---|
| 584 | simply refers to the corresponding concept class. |
---|
| 585 | |
---|
| 586 | - These classes declare every functions, <tt>typedef</tt>s etc. an |
---|
[318] | 587 | implementation of the %concepts should provide, however completely |
---|
[40] | 588 | without implementations and real data structures behind the |
---|
| 589 | interface. On the other hand they should provide nothing else. All |
---|
| 590 | the algorithms working on a data structure meeting a certain concept |
---|
| 591 | should compile with these classes. (Though it will not run properly, |
---|
| 592 | of course.) In this way it is easily to check if an algorithm |
---|
| 593 | doesn't use any extra feature of a certain implementation. |
---|
| 594 | |
---|
| 595 | - The concept descriptor classes also provide a <em>checker class</em> |
---|
[50] | 596 | that makes it possible to check whether a certain implementation of a |
---|
[40] | 597 | concept indeed provides all the required features. |
---|
| 598 | |
---|
| 599 | - Finally, They can serve as a skeleton of a new implementation of a concept. |
---|
| 600 | */ |
---|
| 601 | |
---|
| 602 | /** |
---|
| 603 | @defgroup graph_concepts Graph Structure Concepts |
---|
| 604 | @ingroup concept |
---|
| 605 | \brief Skeleton and concept checking classes for graph structures |
---|
| 606 | |
---|
[50] | 607 | This group describes the skeletons and concept checking classes of LEMON's |
---|
[40] | 608 | graph structures and helper classes used to implement these. |
---|
| 609 | */ |
---|
| 610 | |
---|
[314] | 611 | /** |
---|
| 612 | @defgroup map_concepts Map Concepts |
---|
| 613 | @ingroup concept |
---|
| 614 | \brief Skeleton and concept checking classes for maps |
---|
| 615 | |
---|
| 616 | This group describes the skeletons and concept checking classes of maps. |
---|
[40] | 617 | */ |
---|
| 618 | |
---|
| 619 | /** |
---|
| 620 | \anchor demoprograms |
---|
| 621 | |
---|
| 622 | @defgroup demos Demo programs |
---|
| 623 | |
---|
| 624 | Some demo programs are listed here. Their full source codes can be found in |
---|
| 625 | the \c demo subdirectory of the source tree. |
---|
| 626 | |
---|
[41] | 627 | It order to compile them, use <tt>--enable-demo</tt> configure option when |
---|
| 628 | build the library. |
---|
[40] | 629 | */ |
---|
| 630 | |
---|
| 631 | /** |
---|
| 632 | @defgroup tools Standalone utility applications |
---|
| 633 | |
---|
[209] | 634 | Some utility applications are listed here. |
---|
[40] | 635 | |
---|
| 636 | The standard compilation procedure (<tt>./configure;make</tt>) will compile |
---|
[209] | 637 | them, as well. |
---|
[40] | 638 | */ |
---|
| 639 | |
---|