# Changes in /[506:0f40b9d26049:553:e7eb04ece02c] in lemon-main

Ignore:
Files:
103 edited

Unmodified
Removed

• ## demo/arg_parser_demo.cc

 r311 * This file is a part of LEMON, a generic C++ optimization library. * * Copyright (C) 2003-2008 * Copyright (C) 2003-2009 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES).

• ## demo/lgf_demo.cc

 r294 * This file is a part of LEMON, a generic C++ optimization library. * * Copyright (C) 2003-2008 * Copyright (C) 2003-2009 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES).
• ## doc/CMakeLists.txt

 r500 SET(PACKAGE_NAME ${PROJECT_NAME}) SET(PACKAGE_VERSION${PROJECT_VERSION}) SET(abs_top_srcdir ${CMAKE_SOURCE_DIR}) SET(abs_top_builddir${CMAKE_BINARY_DIR}) SET(abs_top_srcdir ${PROJECT_SOURCE_DIR}) SET(abs_top_builddir${PROJECT_BINARY_DIR}) CONFIGURE_FILE( ${CMAKE_SOURCE_DIR}/doc/Doxyfile.in${CMAKE_BINARY_DIR}/doc/Doxyfile ${PROJECT_SOURCE_DIR}/doc/Doxyfile.in${PROJECT_BINARY_DIR}/doc/Doxyfile @ONLY) COMMAND rm -rf gen-images COMMAND mkdir gen-images COMMAND ${GHOSTSCRIPT_EXECUTABLE} -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha -r18 -sOutputFile=gen-images/grid_graph.png${CMAKE_CURRENT_SOURCE_DIR}/images/grid_graph.eps COMMAND ${GHOSTSCRIPT_EXECUTABLE} -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha -r18 -sOutputFile=gen-images/nodeshape_0.png${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_0.eps COMMAND ${GHOSTSCRIPT_EXECUTABLE} -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha -r18 -sOutputFile=gen-images/nodeshape_1.png${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_1.eps
• ## doc/Doxyfile.in

 r316 ENABLED_SECTIONS       = MAX_INITIALIZER_LINES  = 5 SHOW_USED_FILES        = YES SHOW_USED_FILES        = NO SHOW_DIRECTORIES       = YES SHOW_FILES             = YES
• ## doc/Makefile.am

 r317 DOC_EPS_IMAGES18 = \ grid_graph.eps \ nodeshape_0.eps \ nodeshape_1.eps \
• ## doc/coding_style.dox

 r210 * This file is a part of LEMON, a generic C++ optimization library. * * Copyright (C) 2003-2008 * Copyright (C) 2003-2009 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES).
• ## doc/dirs.dox

 r318 * This file is a part of LEMON, a generic C++ optimization library. * * Copyright (C) 2003-2008 * Copyright (C) 2003-2009 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). \brief Auxiliary tools for implementation. This directory contains some auxiliary classes for implementing graphs, This directory contains some auxiliary classes for implementing graphs, maps and some other classes. As a user you typically don't have to deal with these files.
• ## doc/groups.dox

 r318 * This file is a part of LEMON, a generic C++ optimization library. * * Copyright (C) 2003-2008 * Copyright (C) 2003-2009 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). */ namespace lemon { /** @defgroup datas Data Structures /** @defgroup graph_adaptors Adaptor Classes for Graphs @ingroup graphs \brief Adaptor classes for digraphs and graphs This group contains several useful adaptor classes for digraphs and graphs. The main parts of LEMON are the different graph structures, generic graph algorithms, graph concepts, which couple them, and graph adaptors. While the previous notions are more or less clear, the latter one needs further explanation. Graph adaptors are graph classes which serve for considering graph structures in different ways. A short example makes this much clearer.  Suppose that we have an instance \c g of a directed graph type, say ListDigraph and an algorithm \code template int algorithm(const Digraph&); \endcode is needed to run on the reverse oriented graph.  It may be expensive (in time or in memory usage) to copy \c g with the reversed arcs.  In this case, an adaptor class is used, which (according to LEMON \ref concepts::Digraph "digraph concepts") works as a digraph. The adaptor uses the original digraph structure and digraph operations when methods of the reversed oriented graph are called.  This means that the adaptor have minor memory usage, and do not perform sophisticated algorithmic actions.  The purpose of it is to give a tool for the cases when a graph have to be used in a specific alteration.  If this alteration is obtained by a usual construction like filtering the node or the arc set or considering a new orientation, then an adaptor is worthwhile to use. To come back to the reverse oriented graph, in this situation \code template class ReverseDigraph; \endcode template class can be used. The code looks as follows \code ListDigraph g; ReverseDigraph rg(g); int result = algorithm(rg); \endcode During running the algorithm, the original digraph \c g is untouched. This techniques give rise to an elegant code, and based on stable graph adaptors, complex algorithms can be implemented easily. In flow, circulation and matching problems, the residual graph is of particular importance. Combining an adaptor implementing this with shortest path algorithms or minimum mean cycle algorithms, a range of weighted and cardinality optimization algorithms can be obtained. For other examples, the interested user is referred to the detailed documentation of particular adaptors. The behavior of graph adaptors can be very different. Some of them keep capabilities of the original graph while in other cases this would be meaningless. This means that the concepts that they meet depend on the graph adaptor, and the wrapped graph. For example, if an arc of a reversed digraph is deleted, this is carried out by deleting the corresponding arc of the original digraph, thus the adaptor modifies the original digraph. However in case of a residual digraph, this operation has no sense. Let us stand one more example here to simplify your work. ReverseDigraph has constructor \code ReverseDigraph(Digraph& digraph); \endcode This means that in a situation, when a const %ListDigraph& reference to a graph is given, then it have to be instantiated with Digraph=const %ListDigraph. \code int algorithm1(const ListDigraph& g) { ReverseDigraph rg(g); return algorithm2(rg); } \endcode */ /** @defgroup semi_adaptors Semi-Adaptor Classes for Graphs @ingroup graphs This group describes maps that are specifically designed to assign values to the nodes and arcs of graphs. values to the nodes and arcs/edges of graphs. If you are looking for the standard graph maps (\c NodeMap, \c ArcMap, \c EdgeMap), see the \ref graph_concepts "Graph Structure Concepts". */ maps from other maps. Most of them are \ref lemon::concepts::ReadMap "read-only maps". Most of them are \ref concepts::ReadMap "read-only maps". They can make arithmetic and logical operations between one or two maps (negation, shifting, addition, multiplication, logical 'and', 'or', \brief Common graph search algorithms. This group describes the common graph search algorithms like Breadth-First Search (BFS) and Depth-First Search (DFS). This group describes the common graph search algorithms, namely \e breadth-first \e search (BFS) and \e depth-first \e search (DFS). */ \brief Algorithms for finding shortest paths. This group describes the algorithms for finding shortest paths in graphs. This group describes the algorithms for finding shortest paths in digraphs. - \ref Dijkstra algorithm for finding shortest paths from a source node when all arc lengths are non-negative. - \ref BellmanFord "Bellman-Ford" algorithm for finding shortest paths from a source node when arc lenghts can be either positive or negative, but the digraph should not contain directed cycles with negative total length. - \ref FloydWarshall "Floyd-Warshall" and \ref Johnson "Johnson" algorithms for solving the \e all-pairs \e shortest \e paths \e problem when arc lenghts can be either positive or negative, but the digraph should not contain directed cycles with negative total length. - \ref Suurballe A successive shortest path algorithm for finding arc-disjoint paths between two nodes having minimum total length. */ feasible circulations. The maximum flow problem is to find a flow between a single source and a single target that is maximum. Formally, there is a \f$G=(V,A)\f$ directed graph, an \f$c_a:A\rightarrow\mathbf{R}^+_0\f$ capacity function and given \f$s, t \in V\f$ source and target node. The maximum flow is the \f$f_a\f$ solution of the next optimization problem: \f[ 0 \le f_a \le c_a \f] \f[ \sum_{v\in\delta^{-}(u)}f_{vu}=\sum_{v\in\delta^{+}(u)}f_{uv} \qquad \forall u \in V \setminus \{s,t\}\f] \f[ \max \sum_{v\in\delta^{+}(s)}f_{uv} - \sum_{v\in\delta^{-}(s)}f_{vu}\f] The \e maximum \e flow \e problem is to find a flow of maximum value between a single source and a single target. Formally, there is a \f$G=(V,A)\f$ digraph, a \f$cap:A\rightarrow\mathbf{R}^+_0\f$ capacity function and \f$s, t \in V\f$ source and target nodes. A maximum flow is an \f$f:A\rightarrow\mathbf{R}^+_0\f$ solution of the following optimization problem. \f[ \max\sum_{a\in\delta_{out}(s)}f(a) - \sum_{a\in\delta_{in}(s)}f(a) \f] \f[ \sum_{a\in\delta_{out}(v)} f(a) = \sum_{a\in\delta_{in}(v)} f(a) \qquad \forall v\in V\setminus\{s,t\} \f] \f[ 0 \leq f(a) \leq cap(a) \qquad \forall a\in A \f] LEMON contains several algorithms for solving maximum flow problems: - \ref lemon::EdmondsKarp "Edmonds-Karp" - \ref lemon::Preflow "Goldberg's Preflow algorithm" - \ref lemon::DinitzSleatorTarjan "Dinitz's blocking flow algorithm with dynamic trees" - \ref lemon::GoldbergTarjan "Preflow algorithm with dynamic trees" In most cases the \ref lemon::Preflow "Preflow" algorithm provides the fastest method to compute the maximum flow. All impelementations provides functions to query the minimum cut, which is the dual linear programming problem of the maximum flow. - \ref EdmondsKarp Edmonds-Karp algorithm. - \ref Preflow Goldberg-Tarjan's preflow push-relabel algorithm. - \ref DinitzSleatorTarjan Dinitz's blocking flow algorithm with dynamic trees. - \ref GoldbergTarjan Preflow push-relabel algorithm with dynamic trees. In most cases the \ref Preflow "Preflow" algorithm provides the fastest method for computing a maximum flow. All implementations provides functions to also query the minimum cut, which is the dual problem of the maximum flow. */ This group describes the algorithms for finding minimum cost flows and circulations. The \e minimum \e cost \e flow \e problem is to find a feasible flow of minimum total cost from a set of supply nodes to a set of demand nodes in a network with capacity constraints and arc costs. Formally, let \f$G=(V,A)\f$ be a digraph, \f$lower, upper: A\rightarrow\mathbf{Z}^+_0\f$ denote the lower and upper bounds for the flow values on the arcs, \f$cost: A\rightarrow\mathbf{Z}^+_0\f$ denotes the cost per unit flow on the arcs, and \f$supply: V\rightarrow\mathbf{Z}\f$ denotes the supply/demand values of the nodes. A minimum cost flow is an \f$f:A\rightarrow\mathbf{R}^+_0\f$ solution of the following optimization problem. \f[ \min\sum_{a\in A} f(a) cost(a) \f] \f[ \sum_{a\in\delta_{out}(v)} f(a) - \sum_{a\in\delta_{in}(v)} f(a) = supply(v) \qquad \forall v\in V \f] \f[ lower(a) \leq f(a) \leq upper(a) \qquad \forall a\in A \f] LEMON contains several algorithms for solving minimum cost flow problems: - \ref CycleCanceling Cycle-canceling algorithms. - \ref CapacityScaling Successive shortest path algorithm with optional capacity scaling. - \ref CostScaling Push-relabel and augment-relabel algorithms based on cost scaling. - \ref NetworkSimplex Primal network simplex algorithm with various pivot strategies. */ This group describes the algorithms for finding minimum cut in graphs. The minimum cut problem is to find a non-empty and non-complete \f$X\f$ subset of the vertices with minimum overall capacity on outgoing arcs. Formally, there is \f$G=(V,A)\f$ directed graph, an \f$c_a:A\rightarrow\mathbf{R}^+_0\f$ capacity function. The minimum The \e minimum \e cut \e problem is to find a non-empty and non-complete \f$X\f$ subset of the nodes with minimum overall capacity on outgoing arcs. Formally, there is a \f$G=(V,A)\f$ digraph, a \f$cap: A\rightarrow\mathbf{R}^+_0\f$ capacity function. The minimum cut is the \f$X\f$ solution of the next optimization problem: \f[ \min_{X \subset V, X\not\in \{\emptyset, V\}} \sum_{uv\in A, u\in X, v\not\in X}c_{uv}\f] \sum_{uv\in A, u\in X, v\not\in X}cap(uv) \f] LEMON contains several algorithms related to minimum cut problems: - \ref lemon::HaoOrlin "Hao-Orlin algorithm" to calculate minimum cut in directed graphs - \ref lemon::NagamochiIbaraki "Nagamochi-Ibaraki algorithm" to calculate minimum cut in undirected graphs - \ref lemon::GomoryHuTree "Gomory-Hu tree computation" to calculate all pairs minimum cut in undirected graphs - \ref HaoOrlin "Hao-Orlin algorithm" for calculating minimum cut in directed graphs. - \ref NagamochiIbaraki "Nagamochi-Ibaraki algorithm" for calculating minimum cut in undirected graphs. - \ref GomoryHuTree "Gomory-Hu tree computation" for calculating all-pairs minimum cut in undirected graphs. If you want to find minimum cut just between two distinict nodes, please see the \ref max_flow "Maximum Flow page". see the \ref max_flow "maximum flow problem". */ graphs.  The matching problems in bipartite graphs are generally easier than in general graphs. The goal of the matching optimization can be the finding maximum cardinality, maximum weight or minimum cost can be finding maximum cardinality, maximum weight or minimum cost matching. The search can be constrained to find perfect or maximum cardinality matching. LEMON contains the next algorithms: - \ref lemon::MaxBipartiteMatching "MaxBipartiteMatching" Hopcroft-Karp augmenting path algorithm for calculate maximum cardinality matching in bipartite graphs - \ref lemon::PrBipartiteMatching "PrBipartiteMatching" Push-Relabel algorithm for calculate maximum cardinality matching in bipartite graphs - \ref lemon::MaxWeightedBipartiteMatching "MaxWeightedBipartiteMatching" Successive shortest path algorithm for calculate maximum weighted matching and maximum weighted bipartite matching in bipartite graph - \ref lemon::MinCostMaxBipartiteMatching "MinCostMaxBipartiteMatching" Successive shortest path algorithm for calculate minimum cost maximum matching in bipartite graph - \ref lemon::MaxMatching "MaxMatching" Edmond's blossom shrinking algorithm for calculate maximum cardinality matching in general graph - \ref lemon::MaxWeightedMatching "MaxWeightedMatching" Edmond's blossom shrinking algorithm for calculate maximum weighted matching in general graph - \ref lemon::MaxWeightedPerfectMatching "MaxWeightedPerfectMatching" Edmond's blossom shrinking algorithm for calculate maximum weighted perfect matching in general graph The matching algorithms implemented in LEMON: - \ref MaxBipartiteMatching Hopcroft-Karp augmenting path algorithm for calculating maximum cardinality matching in bipartite graphs. - \ref PrBipartiteMatching Push-relabel algorithm for calculating maximum cardinality matching in bipartite graphs. - \ref MaxWeightedBipartiteMatching Successive shortest path algorithm for calculating maximum weighted matching and maximum weighted bipartite matching in bipartite graphs. - \ref MinCostMaxBipartiteMatching Successive shortest path algorithm for calculating minimum cost maximum matching in bipartite graphs. - \ref MaxMatching Edmond's blossom shrinking algorithm for calculating maximum cardinality matching in general graphs. - \ref MaxWeightedMatching Edmond's blossom shrinking algorithm for calculating maximum weighted matching in general graphs. - \ref MaxWeightedPerfectMatching Edmond's blossom shrinking algorithm for calculating maximum weighted perfect matching in general graphs. \image html bipartite_matching.png This group describes the algorithms for finding a minimum cost spanning tree in a graph tree in a graph. */ /** @defgroup lemon_io LEMON Input-Output @defgroup lemon_io LEMON Graph Format @ingroup io_group \brief Reading and writing LEMON Graph Format. This group describes general \c EPS drawing methods and special graph exporting tools. */ /** @defgroup dimacs_group DIMACS format @ingroup io_group \brief Read and write files in DIMACS format Tools to read a digraph from or write it to a file in DIMACS format data. */ /** @defgroup nauty_group NAUTY Format @ingroup io_group \brief Read \e Nauty format Tool to read graphs from \e Nauty format data. */ \anchor demoprograms @defgroup demos Demo programs @defgroup demos Demo Programs Some demo programs are listed here. Their full source codes can be found in /** @defgroup tools Standalone utility applications @defgroup tools Standalone Utility Applications Some utility applications are listed here. */ }
• ## doc/lgf.dox

 r313 * This file is a part of LEMON, a generic C++ optimization library. * * Copyright (C) 2003-2008 * Copyright (C) 2003-2009 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES).

 r209 * This file is a part of LEMON, a generic C++ optimization library. * * Copyright (C) 2003-2008 * Copyright (C) 2003-2009 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES).
• ## doc/mainpage.dox

 r314 * This file is a part of LEMON, a generic C++ optimization library. * * Copyright (C) 2003-2008 * Copyright (C) 2003-2009 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES).
• ## doc/migration.dox

 r314 * This file is a part of LEMON, a generic C++ optimization library. * * Copyright (C) 2003-2008 * Copyright (C) 2003-2009 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). Many of these changes adjusted automatically by the script/lemon-0.x-to-1.x.sh tool. Those requiring manual lemon-0.x-to-1.x.sh tool. Those requiring manual update are typeset boldface. \warning The script/lemon-0.x-to-1.x.sh tool replaces all instances of the words \c graph, \c digraph, \c edge and \c arc, so it replaces them in strings, comments etc. as well as in all identifiers.The lemon-0.x-to-1.x.sh script replaces the words \c graph, \c ugraph, \c edge and \c uedge in your own identifiers and in strings, comments etc. as well as in all LEMON specific identifiers. So use the script carefully and make a backup copy of your source files before applying the script to them. \section migration-lgf LGF tools
• ## doc/named-param.dox

 r269 * This file is a part of LEMON, a generic C++ optimization library. * * Copyright (C) 2003-2008 * Copyright (C) 2003-2009 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES).
• ## doc/namespaces.dox

 r209 * This file is a part of LEMON, a generic C++ optimization library. * * Copyright (C) 2003-2008 * Copyright (C) 2003-2009 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES).
• ## doc/template.h

 r209 * This file is a part of LEMON, a generic C++ optimization library. * * Copyright (C) 2003-2008 * Copyright (C) 2003-2009 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES).

• ## lemon/arg_parser.cc

 r311 * This file is a part of LEMON, a generic C++ optimization library. * * Copyright (C) 2003-2008 * Copyright (C) 2003-2009 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES).
• ## lemon/arg_parser.h

 r311 * This file is a part of LEMON, a generic C++ optimization library. * * Copyright (C) 2003-2008 * Copyright (C) 2003-2009 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES).
• ## lemon/assert.h

 r290 * This file is a part of LEMON, a generic C++ optimization library. * * Copyright (C) 2003-2008 * Copyright (C) 2003-2009 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES).
• ## lemon/base.cc

 r220 * This file is a part of LEMON, a generic C++ optimization library. * * Copyright (C) 2003-2008 * Copyright (C) 2003-2009 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). namespace lemon { float Tolerance::def_epsilon = 1e-4; float Tolerance::def_epsilon = static_cast(1e-4); double Tolerance::def_epsilon = 1e-10; long double Tolerance::def_epsilon = 1e-14;

• ## lemon/bin_heap.h

 r209 * This file is a part of LEMON, a generic C++ optimization library. * * Copyright (C) 2003-2008 * Copyright (C) 2003-2009 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES).

• ## lemon/bits/base_extender.h

 r314 * This file is a part of LEMON, a generic C++ optimization library. * * Copyright (C) 2003-2008 * Copyright (C) 2003-2009 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). //\ingroup digraphbits //\file //\brief Extenders for the digraph types //\brief Extenders for the graph types namespace lemon {
• ## lemon/bits/bezier.h

 r314 * This file is a part of LEMON, a generic C++ optimization library. * * Copyright (C) 2003-2008 * Copyright (C) 2003-2009 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES).
• ## lemon/bits/default_map.h

 r502 * This file is a part of LEMON, a generic C++ optimization library. * * Copyright (C) 2003-2008 * Copyright (C) 2003-2009 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES).
• ## lemon/bits/enable_if.h

 r314 * This file is a part of LEMON, a generic C++ optimization library. * * Copyright (C) 2003-2008 * Copyright (C) 2003-2009 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES).
• ## lemon/bits/graph_extender.h

 r314 * This file is a part of LEMON, a generic C++ optimization library. * * Copyright (C) 2003-2008 * Copyright (C) 2003-2009 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). //\ingroup graphbits //\file //\brief Extenders for the digraph types //\brief Extenders for the graph types namespace lemon { // \ingroup graphbits // // \brief Extender for the Digraphs // \brief Extender for the digraph implementations template class DigraphExtender : public Base {
• ## lemon/bits/map_extender.h

 r314 * This file is a part of LEMON, a generic C++ optimization library. * * Copyright (C) 2003-2008 * Copyright (C) 2003-2009 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES).
• ## lemon/bits/path_dump.h

 r209 * This file is a part of LEMON, a generic C++ optimization library. * * Copyright (C) 2003-2008 * Copyright (C) 2003-2009 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). */ #ifndef LEMON_BITS_PRED_MAP_PATH_H #define LEMON_BITS_PRED_MAP_PATH_H #ifndef LEMON_BITS_PATH_DUMP_H #define LEMON_BITS_PATH_DUMP_H #include #include namespace lemon {
• ## lemon/bits/traits.h

 r314 * This file is a part of LEMON, a generic C++ optimization library. * * Copyright (C) 2003-2008 * Copyright (C) 2003-2009 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). template struct ArcNumTagIndicator { static const bool value = false; }; template struct ArcNumTagIndicator< Graph, typename enable_if::type > { static const bool value = true; }; template struct EdgeNumTagIndicator { static const bool value = false; template struct FindArcTagIndicator { static const bool value = false; }; template struct FindArcTagIndicator< Graph, typename enable_if::type > { static const bool value = true; }; template struct FindEdgeTagIndicator { static const bool value = false;

• ## lemon/bits/windows.h

 r491 */ #ifndef LEMON_WINDOWS_H #define LEMON_WINDOWS_H #ifndef LEMON_BITS_WINDOWS_H #define LEMON_BITS_WINDOWS_H #include
• ## lemon/color.cc

 r209 * This file is a part of LEMON, a generic C++ optimization library. * * Copyright (C) 2003-2008 * Copyright (C) 2003-2009 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES).
• ## lemon/color.h

 r313 * This file is a part of LEMON, a generic C++ optimization library. * * Copyright (C) 2003-2008 * Copyright (C) 2003-2009 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES).
• ## lemon/concept_check.h

 r285 * This file is a part of LEMON, a generic C++ optimization library. * * Copyright (C) 2003-2008 * Copyright (C) 2003-2009 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES).
• ## lemon/concepts/digraph.h

 r263 * This file is a part of LEMON, a generic C++ optimization library. * * Copyright (C) 2003-2008 * Copyright (C) 2003-2009 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). */ #ifndef LEMON_CONCEPT_DIGRAPH_H #define LEMON_CONCEPT_DIGRAPH_H #ifndef LEMON_CONCEPTS_DIGRAPH_H #define LEMON_CONCEPTS_DIGRAPH_H ///\ingroup graph_concepts #endif // LEMON_CONCEPT_DIGRAPH_H #endif
• ## lemon/concepts/graph.h

 r263 * This file is a part of LEMON, a generic C++ optimization library. * * Copyright (C) 2003-2008 * Copyright (C) 2003-2009 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). ///\brief The concept of Undirected Graphs. #ifndef LEMON_CONCEPT_GRAPH_H #define LEMON_CONCEPT_GRAPH_H #ifndef LEMON_CONCEPTS_GRAPH_H #define LEMON_CONCEPTS_GRAPH_H #include #include #include
• ## lemon/concepts/graph_components.h

 r313 * This file is a part of LEMON, a generic C++ optimization library. * * Copyright (C) 2003-2008 * Copyright (C) 2003-2009 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). #ifndef LEMON_CONCEPT_GRAPH_COMPONENTS_H #define LEMON_CONCEPT_GRAPH_COMPONENTS_H #ifndef LEMON_CONCEPTS_GRAPH_COMPONENTS_H #define LEMON_CONCEPTS_GRAPH_COMPONENTS_H #include /// /// This class provides the minimal set of features needed for a /// directed graph structure. All digraph concepts have to be /// directed graph structure. All digraph concepts have to /// conform to this base directed graph. It just provides types /// for nodes and arcs and functions to get the source and the /// This class provides the minimal set of features needed for an /// undirected graph structure. All undirected graph concepts have /// to be conform to this base graph. It just provides types for /// to conform to this base graph. It just provides types for /// nodes, arcs and edges and functions to get the /// source and the target of the arcs and edges, /// This class provides beside the core digraph features /// core id functions for the digraph structure. /// The most of the base digraphs should be conform to this concept. /// The most of the base digraphs should conform to this concept. /// The id's are unique and immutable. template /// This class provides beside the core undirected graph features /// core id functions for the undirected graph structure.  The /// most of the base undirected graphs should be conform to this /// most of the base undirected graphs should conform to this /// concept.  The id's are unique and immutable. template
• ## lemon/concepts/heap.h

 r290 * This file is a part of LEMON, a generic C++ optimization library. * * Copyright (C) 2003-2008 * Copyright (C) 2003-2009 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). ///\brief The concept of heaps. #ifndef LEMON_CONCEPT_HEAP_H #define LEMON_CONCEPT_HEAP_H #ifndef LEMON_CONCEPTS_HEAP_H #define LEMON_CONCEPTS_HEAP_H #include #include namespace lemon { } // namespace lemon } #endif // LEMON_CONCEPT_PATH_H #endif
• ## lemon/concepts/maps.h

 r314 * This file is a part of LEMON, a generic C++ optimization library. * * Copyright (C) 2003-2008 * Copyright (C) 2003-2009 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). */ #ifndef LEMON_CONCEPT_MAPS_H #define LEMON_CONCEPT_MAPS_H #ifndef LEMON_CONCEPTS_MAPS_H #define LEMON_CONCEPTS_MAPS_H #include } //namespace lemon #endif // LEMON_CONCEPT_MAPS_H #endif
• ## lemon/concepts/path.h

 r281 * This file is a part of LEMON, a generic C++ optimization library. * * Copyright (C) 2003-2008 * Copyright (C) 2003-2009 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). /// #ifndef LEMON_CONCEPT_PATH_H #define LEMON_CONCEPT_PATH_H #ifndef LEMON_CONCEPTS_PATH_H #define LEMON_CONCEPTS_PATH_H #include } // namespace lemon #endif // LEMON_CONCEPT_PATH_H #endif
• ## lemon/config.h.cmake

 r496 #cmakedefine HAVE_LONG_LONG 1 #cmakedefine HAVE_LP 1 #cmakedefine HAVE_MIP 1 #cmakedefine HAVE_GLPK 1
• ## lemon/config.h.in

 r496 /* Define to 1 if you have long long */ #undef HAVE_LONG_LONG /* Define to 1 if you have any LP solver. */ #undef HAVE_LP /* Define to 1 if you have any MIP solver. */ #undef HAVE_MIP /* Define to 1 if you have CPLEX. */ #undef HAVE_CPLEX #undef HAVE_GLPK /* Define to 1 if you have long long */ #undef HAVE_LONG_LONG /* Define to 1 if you have SOPLEX */ #undef HAVE_SOPLEX /* Define to 1 if you have CLP */ #undef HAVE_CLP
• ## lemon/core.h

 r502 * This file is a part of LEMON, a generic C++ optimization library. * * Copyright (C) 2003-2008 * Copyright (C) 2003-2009 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES).
• ## lemon/counter.h

 r209 * This file is a part of LEMON, a generic C++ optimization library. * * Copyright (C) 2003-2008 * Copyright (C) 2003-2009 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES).

• ## lemon/dim2.h

 r314 * This file is a part of LEMON, a generic C++ optimization library. * * Copyright (C) 2003-2008 * Copyright (C) 2003-2009 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES).
• ## lemon/error.h

 r291 * This file is a part of LEMON, a generic C++ optimization library. * * Copyright (C) 2003-2008 * Copyright (C) 2003-2009 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES).
• ## lemon/graph_to_eps.h

 r491 * This file is a part of LEMON, a generic C++ optimization library. * * Copyright (C) 2003-2008 * Copyright (C) 2003-2009 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES).
• ## lemon/kruskal.h

 r220 * This file is a part of LEMON, a generic C++ optimization library. * * Copyright (C) 2003-2008 * Copyright (C) 2003-2009 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES).

 r498 * This file is a part of LEMON, a generic C++ optimization library. * * Copyright (C) 2003-2008 * Copyright (C) 2003-2009 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). readLine(); } line.putback(c); if (readSuccess()) { line.putback(c); } } readLine(); } line.putback(c); if (readSuccess()) { line.putback(c); } } readLine(); } line.putback(c); if (readSuccess()) { line.putback(c); } } readLine(); } line.putback(c); if (readSuccess()) { line.putback(c); } }
• ## lemon/lgf_writer.h

 r498 * This file is a part of LEMON, a generic C++ optimization library. * * Copyright (C) 2003-2008 * Copyright (C) 2003-2009 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES).
• ## lemon/list_graph.h

 r313 * This file is a part of LEMON, a generic C++ optimization library. * * Copyright (C) 2003-2008 * Copyright (C) 2003-2009 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). public: operator Edge() const { return id != -1 ? edgeFromId(id / 2) : INVALID; operator Edge() const { return id != -1 ? edgeFromId(id / 2) : INVALID; }
• ## lemon/maps.h

 r314 * This file is a part of LEMON, a generic C++ optimization library. * * Copyright (C) 2003-2008 * Copyright (C) 2003-2009 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES).
• ## lemon/math.h

 r209 * This file is a part of LEMON, a generic C++ optimization library. * * Copyright (C) 2003-2008 * Copyright (C) 2003-2009 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). const long double SQRT1_2 = 0.7071067811865475244008443621048490L; ///Check whether the parameter is NaN or not ///This function checks whether the parameter is NaN or not. ///Is should be equivalent with std::isnan(), but it is not ///provided by all compilers. inline bool isNaN(double v) { return v!=v; } /// @}
• ## lemon/path.h

 r498 * This file is a part of LEMON, a generic C++ optimization library. * * Copyright (C) 2003-2008 * Copyright (C) 2003-2009 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES).
• ## lemon/random.cc

 r209 * This file is a part of LEMON, a generic C++ optimization library. * * Copyright (C) 2003-2008 * Copyright (C) 2003-2009 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES).
• ## lemon/random.h

 r498 * This file is a part of LEMON, a generic C++ optimization library. * * Copyright (C) 2003-2008 * Copyright (C) 2003-2009 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). /// @{ ///\name Initialization /// /// @{ /// \brief Default constructor /// } /// @} ///\name Uniform distributions /// /// @{ /// \brief Returns a random real number from the range [0, 1) /// return _random_bits::IntConversion::convert(core); } /// @} unsigned int uinteger() { ///\name Non-uniform distributions /// ///@{ /// \brief Returns a random bool /// \brief Returns a random bool with given probability of true result. /// /// It returns a random bool with given probability of true result. } /// Standard Gauss distribution /// Standard Gauss distribution. /// Standard normal (Gauss) distribution /// Standard normal (Gauss) distribution. /// \note The Cartesian form of the Box-Muller /// transformation is used to generate a random normal distribution. return std::sqrt(-2*std::log(S)/S)*V1; } /// Gauss distribution with given mean and standard deviation /// Gauss distribution with given mean and standard deviation. /// Normal (Gauss) distribution with given mean and standard deviation /// Normal (Gauss) distribution with given mean and standard deviation. /// \sa gauss() double gauss(double mean,double std_dev) { return gauss()*std_dev+mean; } /// Lognormal distribution /// Lognormal distribution. The parameters are the mean and the standard /// deviation of exp(X). /// double lognormal(double n_mean,double n_std_dev) { return std::exp(gauss(n_mean,n_std_dev)); } /// Lognormal distribution /// Lognormal distribution. The parameter is an std::pair of /// the mean and the standard deviation of exp(X). /// double lognormal(const std::pair ¶ms) { return std::exp(gauss(params.first,params.second)); } /// Compute the lognormal parameters from mean and standard deviation /// This function computes the lognormal parameters from mean and /// standard deviation. The return value can direcly be passed to /// lognormal(). std::pair lognormalParamsFromMD(double mean, double std_dev) { double fr=std_dev/mean; fr*=fr; double lg=std::log(1+fr); return std::pair(std::log(mean)-lg/2.0,std::sqrt(lg)); } /// Lognormal distribution with given mean and standard deviation /// Lognormal distribution with given mean and standard deviation. /// double lognormalMD(double mean,double std_dev) { return lognormal(lognormalParamsFromMD(mean,std_dev)); } ///\name Two dimensional distributions /// ///@{ return dim2::Point(V1,V2); } /// A kind of two dimensional Gauss distribution /// A kind of two dimensional normal (Gauss) distribution /// This function provides a turning symmetric two-dimensional distribution.
• ## lemon/smart_graph.h

 r313 * This file is a part of LEMON, a generic C++ optimization library. * * Copyright (C) 2003-2008 * Copyright (C) 2003-2009 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). typedef True NodeNumTag; typedef True EdgeNumTag; typedef True ArcNumTag; int nodeNum() const { return nodes.size(); } nodes[b._id].first_out=nodes[n._id].first_out; nodes[n._id].first_out=-1; for(int i=nodes[b._id].first_out;i!=-1;i++) arcs[i].source=b._id; for(int i=nodes[b._id].first_out; i!=-1; i=arcs[i].next_out) { arcs[i].source=b._id; } if(connect) addArc(n,b); return b; public: operator Edge() const { return _id != -1 ? edgeFromId(_id / 2) : INVALID; operator Edge() const { return _id != -1 ? edgeFromId(_id / 2) : INVALID; } : nodes(), arcs() {} typedef True NodeNumTag; typedef True EdgeNumTag; typedef True ArcNumTag; int nodeNum() const { return nodes.size(); } int edgeNum() const { return arcs.size() / 2; } int arcNum() const { return arcs.size(); } int maxNodeId() const { return nodes.size()-1; } dir.push_back(arcFromId(n-1)); Parent::notifier(Arc()).erase(dir); nodes[arcs[n].target].first_out=arcs[n].next_out; nodes[arcs[n-1].target].first_out=arcs[n-1].next_out; nodes[arcs[n-1].target].first_out=arcs[n].next_out; nodes[arcs[n].target].first_out=arcs[n-1].next_out; arcs.pop_back(); arcs.pop_back();
• ## lemon/time_measure.h

 r505 * This file is a part of LEMON, a generic C++ optimization library. * * Copyright (C) 2003-2008 * Copyright (C) 2003-2009 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES).
• ## lemon/tolerance.h

 r497 * This file is a part of LEMON, a generic C++ optimization library. * * Copyright (C) 2003-2008 * Copyright (C) 2003-2009 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES).
• ## lemon/unionfind.h

 r438 * This file is a part of LEMON, a generic C++ optimization library. * * Copyright (C) 2003-2008 * Copyright (C) 2003-2009 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). popLeft(nodes[jd].next); pushRight(jd, ld); if (less(ld, nodes[jd].left) || if (less(ld, nodes[jd].left) || nodes[ld].item == nodes[pd].item) { nodes[jd].item = nodes[ld].item;

• ## test/bfs_test.cc

 r293 * This file is a part of LEMON, a generic C++ optimization library. * * Copyright (C) 2003-2008 * Copyright (C) 2003-2009 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES).
• ## test/counter_test.cc

 r209 * This file is a part of LEMON, a generic C++ optimization library. * * Copyright (C) 2003-2008 * Copyright (C) 2003-2009 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES).
• ## test/dfs_test.cc

 r293 * This file is a part of LEMON, a generic C++ optimization library. * * Copyright (C) 2003-2008 * Copyright (C) 2003-2009 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES).

• ## test/dijkstra_test.cc

 r397 * This file is a part of LEMON, a generic C++ optimization library. * * Copyright (C) 2003-2008 * Copyright (C) 2003-2009 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES).
• ## test/dim_test.cc

 r253 * This file is a part of LEMON, a generic C++ optimization library. * * Copyright (C) 2003-2008 * Copyright (C) 2003-2009 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES).
• ## test/error_test.cc

 r277 * This file is a part of LEMON, a generic C++ optimization library. * * Copyright (C) 2003-2008 * Copyright (C) 2003-2009 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES).
• ## test/graph_copy_test.cc

 r282 * This file is a part of LEMON, a generic C++ optimization library. * * Copyright (C) 2003-2008 * Copyright (C) 2003-2009 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES).