# Changes in /[536:47b376a5a2a7:609:538b3dd9a2c0] in lemon

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

 r520 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 This group describes the several data structures implemented in LEMON. This group contains the several data structures implemented in LEMON. */ /** @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 \brief Graph types between real graphs and graph adaptors. This group describes some graph types between real graphs and graph adaptors. This group contains some graph types between real graphs and graph adaptors. These classes wrap graphs to give new functionality as the adaptors do it. On the other hand they are not light-weight structures as the adaptors. \brief Map structures implemented in LEMON. This group describes the map structures implemented in LEMON. This group contains the map structures implemented in LEMON. LEMON provides several special purpose maps and map adaptors that e.g. combine \brief Special graph-related maps. This group describes maps that are specifically designed to assign values to the nodes and arcs of graphs. This group contains maps that are specifically designed to assign 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". */ \brief Tools to create new maps from existing ones This group describes map adaptors that are used to create "implicit" This group contains map adaptors that are used to create "implicit" 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 Two dimensional data storages implemented in LEMON. This group describes two dimensional data storages implemented in LEMON. This group contains two dimensional data storages implemented in LEMON. */ \brief %Path structures implemented in LEMON. This group describes the path structures implemented in LEMON. This group contains the path structures implemented in LEMON. LEMON provides flexible data structures to work with paths. \brief Auxiliary data structures implemented in LEMON. This group describes some data structures implemented in LEMON in This group contains some data structures implemented in LEMON in order to make it easier to implement combinatorial algorithms. */ /** @defgroup algs Algorithms \brief This group describes the several algorithms \brief This group contains the several algorithms implemented in LEMON. This group describes the several algorithms This group contains the several algorithms implemented in LEMON. */ \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 contains 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 contains 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. */ \brief Algorithms for finding maximum flows. This group describes the algorithms for finding maximum flows and This group contains the algorithms for finding maximum flows and 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. */ \brief Algorithms for finding minimum cost flows and circulations. This group describes the algorithms for finding minimum cost flows and This group contains 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. */ \brief Algorithms for finding minimum cut in graphs. 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 This group contains the algorithms for finding minimum cut in graphs. 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 GomoryHu "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". */ \brief Algorithms for discovering the graph properties This group describes the algorithms for discovering the graph properties This group contains the algorithms for discovering the graph properties like connectivity, bipartiteness, euler property, simplicity etc. \brief Algorithms for planarity checking, embedding and drawing This group describes the algorithms for planarity checking, This group contains the algorithms for planarity checking, embedding and drawing. 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 \brief Algorithms for finding a minimum cost spanning tree in a graph. This group describes the algorithms for finding a minimum cost spanning tree in a graph This group contains the algorithms for finding a minimum cost spanning tree in a graph. */ \brief Auxiliary algorithms implemented in LEMON. This group describes some algorithms implemented in LEMON This group contains some algorithms implemented in LEMON in order to make it easier to implement complex algorithms. */ \brief Approximation algorithms. This group describes the approximation and heuristic algorithms This group contains the approximation and heuristic algorithms implemented in LEMON. */ /** @defgroup gen_opt_group General Optimization Tools \brief This group describes some general optimization frameworks \brief This group contains some general optimization frameworks implemented in LEMON. This group describes some general optimization frameworks This group contains some general optimization frameworks implemented in LEMON. */ \brief Lp and Mip solver interfaces for LEMON. This group describes Lp and Mip solver interfaces for LEMON. The This group contains Lp and Mip solver interfaces for LEMON. The various LP solvers could be used in the same manner with this interface. \brief Metaheuristics for LEMON library. This group describes some metaheuristic optimization tools. This group contains some metaheuristic optimization tools. */ \brief Simple basic graph utilities. This group describes some simple basic graph utilities. This group contains some simple basic graph utilities. */ \brief Tools for development, debugging and testing. This group describes several useful tools for development, This group contains several useful tools for development, debugging and testing. */ \brief Simple tools for measuring the performance of algorithms. This group describes simple tools for measuring the performance This group contains simple tools for measuring the performance of algorithms. */ \brief Exceptions defined in LEMON. This group describes the exceptions defined in LEMON. This group contains the exceptions defined in LEMON. */ \brief Graph Input-Output methods This group describes the tools for importing and exporting graphs This group contains the tools for importing and exporting graphs and graph related data. Now it supports the \ref lgf-format "LEMON Graph Format", the \c DIMACS format and the encapsulated /** @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 methods for reading and writing This group contains methods for reading and writing \ref lgf-format "LEMON Graph Format". */ \brief General \c EPS drawer and graph exporter This group describes general \c EPS drawing methods and special This group contains 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. */ \brief Skeleton classes and concept checking classes This group describes the data/algorithm skeletons and concept checking This group contains the data/algorithm skeletons and concept checking classes implemented in LEMON. \brief Skeleton and concept checking classes for graph structures This group describes the skeletons and concept checking classes of LEMON's This group contains the skeletons and concept checking classes of LEMON's graph structures and helper classes used to implement these. */ \brief Skeleton and concept checking classes for maps This group describes the skeletons and concept checking classes of maps. This group contains the skeletons and concept checking classes of maps. */ \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). "Quick Tour to LEMON" which will guide you along. If you already feel like using our library, see the page that tells you \ref getstart "How to start using LEMON". If you want to see how LEMON works, see some \ref demoprograms "demo programs". If you already feel like using our library, see the LEMON Tutorial. If you know what you are looking for then try to find it under the Modules section. Modules section. If you are a user of the old (0.x) series of LEMON, please check out the
• ## 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). ///\brief A Binary Heap implementation. /// ///This class implements the \e binary \e heap data structure. A \e heap ///is a data structure for storing items with specified values called \e ///priorities in such a way that finding the item with minimum priority is ///efficient. \c Compare specifies the ordering of the priorities. In a heap ///one can change the priority of an item, add or erase an item, etc. ///This class implements the \e binary \e heap data structure. /// ///A \e heap is a data structure for storing items with specified values ///called \e priorities in such a way that finding the item with minimum ///priority is efficient. \c Comp specifies the ordering of the priorities. ///In a heap one can change the priority of an item, add or erase an ///item, etc. /// ///\tparam _Prio Type of the priority of the items. ///\tparam _ItemIntMap A read and writable Item int map, used internally ///\tparam PR Type of the priority of the items. ///\tparam IM A read and writable item map with int values, used internally ///to handle the cross references. ///\tparam _Compare A class for the ordering of the priorities. The ///default is \c std::less<_Prio>. ///\tparam Comp A functor class for the ordering of the priorities. ///The default is \c std::less. /// ///\sa FibHeap ///\sa Dijkstra template > template > class BinHeap { public: ///\e typedef _ItemIntMap ItemIntMap; ///\e typedef _Prio Prio; typedef IM ItemIntMap; ///\e typedef PR Prio; ///\e typedef typename ItemIntMap::Key Item; typedef std::pair Pair; ///\e typedef _Compare Compare; typedef Comp Compare; /// \brief Type to represent the items states. /// heap's point of view, but may be useful to the user. /// /// The ItemIntMap \e should be initialized in such way that it maps /// PRE_HEAP (-1) to any element to be put in the heap... /// The item-int map must be initialized in such way that it assigns /// \c PRE_HEAP (-1) to any element to be put in the heap. enum State { IN_HEAP = 0, PRE_HEAP = -1, POST_HEAP = -2 IN_HEAP = 0,    ///< \e PRE_HEAP = -1,  ///< \e POST_HEAP = -2  ///< \e }; private: std::vector data; Compare comp; ItemIntMap &iim; std::vector _data; Compare _comp; ItemIntMap &_iim; public: /// /// The constructor. /// \param _iim should be given to the constructor, since it is used /// \param map should be given to the constructor, since it is used /// internally to handle the cross references. The value of the map /// must be \c PRE_HEAP (-1) for every item. explicit BinHeap(ItemIntMap &map) : _iim(map) {} /// \brief The constructor. /// /// The constructor. /// \param map should be given to the constructor, since it is used /// internally to handle the cross references. The value of the map /// should be PRE_HEAP (-1) for each element. explicit BinHeap(ItemIntMap &_iim) : iim(_iim) {} /// \brief The constructor. /// /// The constructor. /// \param _iim should be given to the constructor, since it is used /// internally to handle the cross references. The value of the map /// should be PRE_HEAP (-1) for each element. /// /// \param _comp The comparator function object. BinHeap(ItemIntMap &_iim, const Compare &_comp) : iim(_iim), comp(_comp) {} /// /// \param comp The comparator function object. BinHeap(ItemIntMap &map, const Compare &comp) : _iim(map), _comp(comp) {} /// /// \brief Returns the number of items stored in the heap. int size() const { return data.size(); } int size() const { return _data.size(); } /// \brief Checks if the heap stores no items. /// /// Returns \c true if and only if the heap stores no items. bool empty() const { return data.empty(); } bool empty() const { return _data.empty(); } /// \brief Make empty this heap. /// each item to \c PRE_HEAP. void clear() { data.clear(); _data.clear(); } static int second_child(int i) { return 2*i+2; } bool less(const Pair &p1, const Pair &p2) const { return comp(p1.second, p2.second); return _comp(p1.second, p2.second); } int bubble_up(int hole, Pair p) { int par = parent(hole); while( hole>0 && less(p,data[par]) ) { move(data[par],hole); while( hole>0 && less(p,_data[par]) ) { move(_data[par],hole); hole = par; par = parent(hole); int child = second_child(hole); while(child < length) { if( less(data[child-1], data[child]) ) { if( less(_data[child-1], _data[child]) ) { --child; } if( !less(data[child], p) ) if( !less(_data[child], p) ) goto ok; move(data[child], hole); move(_data[child], hole); hole = child; child = second_child(hole); } child--; if( child 0) { bubble_down(0, data[n], n); } data.pop_back(); bubble_down(0, _data[n], n); } _data.pop_back(); } /// \pre The item should be in the heap. void erase(const Item &i) { int h = iim[i]; int n = data.size()-1; iim.set(data[h].first, POST_HEAP); int h = _iim[i]; int n = _data.size()-1; _iim.set(_data[h].first, POST_HEAP); if( h < n ) { if ( bubble_up(h, data[n]) == h) { bubble_down(h, data[n], n); if ( bubble_up(h, _data[n]) == h) { bubble_down(h, _data[n], n); } } data.pop_back(); _data.pop_back(); } /// /// This function returns the priority of item \c i. /// \param i The item. /// \pre \c i must be in the heap. /// \param i The item. Prio operator[](const Item &i) const { int idx = iim[i]; return data[idx].second; int idx = _iim[i]; return _data[idx].second; } /// \param p The priority. void set(const Item &i, const Prio &p) { int idx = iim[i]; int idx = _iim[i]; if( idx < 0 ) { push(i,p); } else if( comp(p, data[idx].second) ) { else if( _comp(p, _data[idx].second) ) { bubble_up(idx, Pair(i,p)); } else { bubble_down(idx, Pair(i,p), data.size()); bubble_down(idx, Pair(i,p), _data.size()); } } /// /// This method decreases the priority of item \c i to \c p. /// \param i The item. /// \param p The priority. /// \pre \c i must be stored in the heap with priority at least \c /// p relative to \c Compare. void decrease(const Item &i, const Prio &p) { int idx = _iim[i]; bubble_up(idx, Pair(i,p)); } /// \brief Increases the priority of \c i to \c p. /// /// This method sets the priority of item \c i to \c p. /// \param i The item. /// \param p The priority. void decrease(const Item &i, const Prio &p) { int idx = iim[i]; bubble_up(idx, Pair(i,p)); } /// \brief Increases the priority of \c i to \c p. /// /// This method sets the priority of item \c i to \c p. /// \pre \c i must be stored in the heap with priority at most \c /// p relative to \c Compare. /// \param i The item. /// \param p The priority. void increase(const Item &i, const Prio &p) { int idx = iim[i]; bubble_down(idx, Pair(i,p), data.size()); int idx = _iim[i]; bubble_down(idx, Pair(i,p), _data.size()); } /// \param i The item. State state(const Item &i) const { int s = iim[i]; int s = _iim[i]; if( s>=0 ) s=0; erase(i); } iim[i] = st; _iim[i] = st; break; case IN_HEAP: /// with the same prioriority as prevoiusly the \c i item. void replace(const Item& i, const Item& j) { int idx = iim[i]; iim.set(i, iim[j]); iim.set(j, idx); data[idx].first = j; int idx = _iim[i]; _iim.set(i, _iim[j]); _iim.set(j, idx); _data[idx].first = j; }

• ## 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

 r523 * 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

 r511 */ #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 /// \brief Opposite node on an arc /// /// \return the opposite of the given Node on the given Edge /// \return The opposite of the given node on the given edge. Node oppositeNode(Node, Edge) const { return INVALID; } /// \brief First node of the edge. /// /// \return the first node of the given Edge. /// \return The first node of the given edge. /// /// Naturally edges don't have direction and thus /// don't have source and target node. But we use these two methods /// to query the two nodes of the arc. The direction of the arc /// which arises this way is called the inherent direction of the /// don't have source and target node. However we use \c u() and \c v() /// methods to query the two nodes of the arc. The direction of the /// arc which arises this way is called the inherent direction of the /// edge, and is used to define the "default" direction /// of the directed versions of the arcs. /// \sa direction /// \sa v() /// \sa direction() Node u(Edge) const { return INVALID; } /// \brief Second node of the edge. /// /// \return The second node of the given edge. /// /// Naturally edges don't have direction and thus /// don't have source and target node. However we use \c u() and \c v() /// methods to query the two nodes of the arc. The direction of the /// arc which arises this way is called the inherent direction of the /// edge, and is used to define the "default" direction /// of the directed versions of the arcs. /// \sa u() /// \sa direction() Node v(Edge) const { return INVALID; }

• ## 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 { /// \brief The heap concept. /// /// Concept class describing the main interface of heaps. template /// Concept class describing the main interface of heaps. A \e heap /// is a data structure for storing items with specified values called /// \e priorities in such a way that finding the item with minimum /// priority is efficient. In a heap one can change the priority of an /// item, add or erase an item, etc. /// /// \tparam PR Type of the priority of the items. /// \tparam IM A read and writable item map with int values, used /// internally to handle the cross references. /// \tparam Comp A functor class for the ordering of the priorities. /// The default is \c std::less. #ifdef DOXYGEN template > #else template #endif class Heap { public: /// Type of the item-int map. typedef IM ItemIntMap; /// Type of the priorities. typedef PR Prio; /// Type of the items stored in the heap. typedef typename ItemIntMap::Key Item; /// Type of the priorities. typedef Priority Prio; /// \brief Type to represent the states of the items. /// the user. /// /// The \c ItemIntMap must be initialized in such a way, that it /// assigns \c PRE_HEAP (-1) to every item. /// The item-int map must be initialized in such way that it assigns /// \c PRE_HEAP (-1) to any element to be put in the heap. enum State { IN_HEAP = 0, PRE_HEAP = -1, POST_HEAP = -2 IN_HEAP = 0,    ///< The "in heap" state constant. PRE_HEAP = -1,  ///< The "pre heap" state constant. POST_HEAP = -2  ///< The "post heap" state constant. }; /// /// Returns the priority of the given item. /// \param i The item. /// \pre \c i must be in the heap. /// \param i The item. Prio operator[](const Item &i) const {} /// /// Decreases the priority of an item to the given value. /// \param i The item. /// \param p The priority. /// \pre \c i must be stored in the heap with priority at least \c p. void decrease(const Item &i, const Prio &p) {} /// \brief Increases the priority of an item to the given value. /// /// Increases the priority of an item to the given value. /// \param i The item. /// \param p The priority. void decrease(const Item &i, const Prio &p) {} /// \brief Increases the priority of an item to the given value. /// /// Increases the priority of an item to the given value. /// \pre \c i must be stored in the heap with priority at most \c p. /// \param i The item. /// \param p The priority. void increase(const Item &i, const Prio &p) {} } // 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 /// A skeleton structure for representing directed paths in a /// digraph. /// \tparam _Digraph The digraph type in which the path is. /// \tparam GR The digraph type in which the path is. /// /// In a sense, the path can be treated as a list of arcs. The /// paths cannot store the source. /// template template class Path { public: /// Type of the underlying digraph. typedef _Digraph Digraph; typedef GR Digraph; /// Arc type of the underlying digraph. typedef typename Digraph::Arc Arc; /// assigned to a real path and the dumpers can be implemented as /// an adaptor class to the predecessor map. /// \tparam _Digraph The digraph type in which the path is. /// /// \tparam GR The digraph type in which the path is. /// /// The paths can be constructed from any path type by a /// template constructor or a template assignment operator. /// template template class PathDumper { public: /// Type of the underlying digraph. typedef _Digraph Digraph; typedef GR Digraph; /// Arc type of the underlying digraph. typedef typename Digraph::Arc Arc; } // namespace lemon #endif // LEMON_CONCEPT_PATH_H #endif
• ## lemon/config.h.cmake

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

 r515 /* 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

 r523 * 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). ///\sa findArc() ///\sa ArcLookUp, AllArcLookUp, DynArcLookUp template class ConArcIt : public _Graph::Arc { template class ConArcIt : public GR::Arc { public: typedef _Graph Graph; typedef GR Graph; typedef typename Graph::Arc Parent; /// ///\sa findEdge() template class ConEdgeIt : public _Graph::Edge { template class ConEdgeIt : public GR::Edge { public: typedef _Graph Graph; typedef GR Graph; typedef typename Graph::Edge Parent; ///queries. /// ///\tparam G The type of the underlying digraph. ///\tparam GR The type of the underlying digraph. /// ///\sa ArcLookUp ///\sa AllArcLookUp template template  class DynArcLookUp : protected ItemSetTraits::ItemNotifier::ObserverBase : protected ItemSetTraits::ItemNotifier::ObserverBase { public: typedef typename ItemSetTraits typedef typename ItemSetTraits ::ItemNotifier::ObserverBase Parent; TEMPLATE_DIGRAPH_TYPEDEFS(G); typedef G Digraph; TEMPLATE_DIGRAPH_TYPEDEFS(GR); typedef GR Digraph; protected: class AutoNodeMap : public ItemSetTraits::template Map::Type { class AutoNodeMap : public ItemSetTraits::template Map::Type { public: typedef typename ItemSetTraits::template Map::Type Parent; AutoNodeMap(const G& digraph) : Parent(digraph, INVALID) {} typedef typename ItemSetTraits::template Map::Type Parent; AutoNodeMap(const GR& digraph) : Parent(digraph, INVALID) {} virtual void add(const Node& node) { ///(O(m logm)) to the number of arcs). /// ///\tparam G The type of the underlying digraph. ///\tparam GR The type of the underlying digraph. /// ///\sa DynArcLookUp ///\sa AllArcLookUp template template class ArcLookUp { public: TEMPLATE_DIGRAPH_TYPEDEFS(G); typedef G Digraph; TEMPLATE_DIGRAPH_TYPEDEFS(GR); typedef GR Digraph; protected: ///(O(m logm)) to the number of arcs). /// ///\tparam G The type of the underlying digraph. ///\tparam GR The type of the underlying digraph. /// ///\sa DynArcLookUp ///\sa ArcLookUp template class AllArcLookUp : public ArcLookUp template class AllArcLookUp : public ArcLookUp { using ArcLookUp::_g; using ArcLookUp::_right; using ArcLookUp::_left; using ArcLookUp::_head; TEMPLATE_DIGRAPH_TYPEDEFS(G); typedef G Digraph; using ArcLookUp::_g; using ArcLookUp::_right; using ArcLookUp::_left; using ArcLookUp::_head; TEMPLATE_DIGRAPH_TYPEDEFS(GR); typedef GR Digraph; typename Digraph::template ArcMap _next; ///It builds up the search database, which remains valid until the digraph ///changes. AllArcLookUp(const Digraph &g) : ArcLookUp(g), _next(g) {refreshNext();} AllArcLookUp(const Digraph &g) : ArcLookUp(g), _next(g) {refreshNext();} ///Refresh the data structure at a node. void refresh(Node n) { ArcLookUp::refresh(n); ArcLookUp::refresh(n); refreshNext(_head[n]); } Arc operator()(Node s, Node t, Arc prev=INVALID) const {} #else using ArcLookUp::operator() ; using ArcLookUp::operator() ; Arc operator()(Node s, Node t, Arc prev) const {
• ## 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).