# HG changeset patch # User Alpar Juttner # Date 1324401338 -3600 # Node ID a1fd7008a052105a3566e6ac96711c3d010aec99 # Parent 2b6bffe0e7e8fb2289e499ae0933a7d77cc7aab4# Parent 87569cb5734dee71de7e2c449c1cd6500921e2a7 Merge diff -r 2b6bffe0e7e8 -r a1fd7008a052 LICENSE --- a/LICENSE Tue Dec 20 18:15:14 2011 +0100 +++ b/LICENSE Tue Dec 20 18:15:38 2011 +0100 @@ -1,7 +1,7 @@ LEMON code without an explicit copyright notice is covered by the following copyright/license. -Copyright (C) 2003-2009 Egervary Jeno Kombinatorikus Optimalizalasi +Copyright (C) 2003-2010 Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport (Egervary Combinatorial Optimization Research Group, EGRES). diff -r 2b6bffe0e7e8 -r a1fd7008a052 NEWS --- a/NEWS Tue Dec 20 18:15:14 2011 +0100 +++ b/NEWS Tue Dec 20 18:15:38 2011 +0100 @@ -1,3 +1,83 @@ +2010-03-19 Version 1.2 released + + This is major feature release + + * New algorithms + * Bellman-Ford algorithm (#51) + * Minimum mean cycle algorithms (#179) + * Karp, Hartman-Orlin and Howard algorithms + * New minimum cost flow algorithms (#180) + * Cost Scaling algorithms + * Capacity Scaling algorithm + * Cycle-Canceling algorithms + * Planarity related algorithms (#62) + * Planarity checking algorithm + * Planar embedding algorithm + * Schnyder's planar drawing algorithm + * Coloring planar graphs with five or six colors + * Fractional matching algorithms (#314) + * New data structures + * StaticDigraph structure (#68) + * Several new priority queue structures (#50, #301) + * Fibonacci, Radix, Bucket, Pairing, Binomial + D-ary and fourary heaps (#301) + * Iterable map structures (#73) + * Other new tools and functionality + * Map utility functions (#320) + * Reserve functions are added to ListGraph and SmartGraph (#311) + * A resize() function is added to HypercubeGraph (#311) + * A count() function is added to CrossRefMap (#302) + * Support for multiple targets in Suurballe using fullInit() (#181) + * Traits class and named parameters for Suurballe (#323) + * Separate reset() and resetParams() functions in NetworkSimplex + to handle graph changes (#327) + * tolerance() functions are added to HaoOrlin (#306) + * Implementation improvements + * Improvements in weighted matching algorithms (#314) + * Jumpstart initialization + * ArcIt iteration is based on out-arc lists instead of in-arc lists + in ListDigraph (#311) + * Faster add row operation in CbcMip (#203) + * Better implementation for split() in ListDigraph (#311) + * ArgParser can also throw exception instead of exit(1) (#332) + * Miscellaneous + * A simple interactive bootstrap script + * Doc improvements (#62,#180,#299,#302,#303,#304,#307,#311,#331,#315, + #316,#319) + * BibTeX references in the doc (#184) + * Optionally use valgrind when running tests + * Also check ReferenceMapTag in concept checks (#312) + * dimacs-solver uses long long type by default. + * Several bugfixes (compared to release 1.1): + #295: Suppress MSVC warnings using pragmas + ----: Various CMAKE related improvements + * Remove duplications from doc/CMakeLists.txt + * Rename documentation install folder from 'docs' to 'html' + * Add tools/CMakeLists.txt to the tarball + * Generate and install LEMONConfig.cmake + * Change the label of the html project in Visual Studio + * Fix the check for the 'long long' type + * Put the version string into config.h + * Minor CMake improvements + * Set the version to 'hg-tip' if everything fails + #311: Add missing 'explicit' keywords + #302: Fix the implementation and doc of CrossRefMap + #308: Remove duplicate list_graph.h entry from source list + #307: Bugfix in Preflow and Circulation + #305: Bugfix and extension in the rename script + #312: Also check ReferenceMapTag in concept checks + #250: Bugfix in pathSource() and pathTarget() + #321: Use pathCopy(from,to) instead of copyPath(to,from) + #322: Distribure LEMONConfig.cmake.in + #330: Bug fix in map_extender.h + #336: Fix the date field comment of graphToEps() output + #323: Bug fix in Suurballe + #335: Fix clear() function in ExtendFindEnum + #337: Use void* as the LPX object pointer + #317: Fix (and improve) error message in mip_test.cc + Remove unnecessary OsiCbc dependency + #356: Allow multiple executions of weighted matching algorithms (#356) + 2009-05-13 Version 1.1 released This is the second stable release of the 1.x series. It @@ -72,7 +152,7 @@ ----: Minor clarification in the LICENSE file ----: Add missing unistd.h include to time_measure.h #204: Compilation bug fixed in graph_to_eps.h with VS2005 - #214,#215: windows.h should never be included by lemon headers + #214,#215: windows.h should never be included by LEMON headers #230: Build systems check the availability of 'long long' type #229: Default implementation of Tolerance<> is used for integer types #211,#212: Various fixes for compiling on AIX @@ -94,51 +174,51 @@ 2008-10-13 Version 1.0 released - This is the first stable release of LEMON. Compared to the 0.x - release series, it features a considerably smaller but more - matured set of tools. The API has also completely revised and - changed in several places. + This is the first stable release of LEMON. Compared to the 0.x + release series, it features a considerably smaller but more + matured set of tools. The API has also completely revised and + changed in several places. - * The major name changes compared to the 0.x series (see the + * The major name changes compared to the 0.x series (see the Migration Guide in the doc for more details) * Graph -> Digraph, UGraph -> Graph * Edge -> Arc, UEdge -> Edge - * source(UEdge)/target(UEdge) -> u(Edge)/v(Edge) - * Other improvements - * Better documentation - * Reviewed and cleaned up codebase - * CMake based build system (along with the autotools based one) - * Contents of the library (ported from 0.x) - * Algorithms - * breadth-first search (bfs.h) - * depth-first search (dfs.h) - * Dijkstra's algorithm (dijkstra.h) - * Kruskal's algorithm (kruskal.h) - * Data structures - * graph data structures (list_graph.h, smart_graph.h) - * path data structures (path.h) - * binary heap data structure (bin_heap.h) - * union-find data structures (unionfind.h) - * miscellaneous property maps (maps.h) - * two dimensional vector and bounding box (dim2.h) + * source(UEdge)/target(UEdge) -> u(Edge)/v(Edge) + * Other improvements + * Better documentation + * Reviewed and cleaned up codebase + * CMake based build system (along with the autotools based one) + * Contents of the library (ported from 0.x) + * Algorithms + * breadth-first search (bfs.h) + * depth-first search (dfs.h) + * Dijkstra's algorithm (dijkstra.h) + * Kruskal's algorithm (kruskal.h) + * Data structures + * graph data structures (list_graph.h, smart_graph.h) + * path data structures (path.h) + * binary heap data structure (bin_heap.h) + * union-find data structures (unionfind.h) + * miscellaneous property maps (maps.h) + * two dimensional vector and bounding box (dim2.h) * Concepts - * graph structure concepts (concepts/digraph.h, concepts/graph.h, + * graph structure concepts (concepts/digraph.h, concepts/graph.h, concepts/graph_components.h) - * concepts for other structures (concepts/heap.h, concepts/maps.h, - concepts/path.h) - * Tools - * Mersenne twister random number generator (random.h) - * tools for measuring cpu and wall clock time (time_measure.h) - * tools for counting steps and events (counter.h) - * tool for parsing command line arguments (arg_parser.h) - * tool for visualizing graphs (graph_to_eps.h) - * tools for reading and writing data in LEMON Graph Format + * concepts for other structures (concepts/heap.h, concepts/maps.h, + concepts/path.h) + * Tools + * Mersenne twister random number generator (random.h) + * tools for measuring cpu and wall clock time (time_measure.h) + * tools for counting steps and events (counter.h) + * tool for parsing command line arguments (arg_parser.h) + * tool for visualizing graphs (graph_to_eps.h) + * tools for reading and writing data in LEMON Graph Format (lgf_reader.h, lgf_writer.h) * tools to handle the anomalies of calculations with - floating point numbers (tolerance.h) + floating point numbers (tolerance.h) * tools to manage RGB colors (color.h) - * Infrastructure - * extended assertion handling (assert.h) - * exception classes and error handling (error.h) - * concept checking (concept_check.h) - * commonly used mathematical constants (math.h) + * Infrastructure + * extended assertion handling (assert.h) + * exception classes and error handling (error.h) + * concept checking (concept_check.h) + * commonly used mathematical constants (math.h) diff -r 2b6bffe0e7e8 -r a1fd7008a052 doc/groups.dox --- a/doc/groups.dox Tue Dec 20 18:15:14 2011 +0100 +++ b/doc/groups.dox Tue Dec 20 18:15:38 2011 +0100 @@ -263,14 +263,6 @@ */ /** -@defgroup matrices Matrices -@ingroup datas -\brief Two dimensional data storages implemented in LEMON. - -This group contains two dimensional data storages implemented in LEMON. -*/ - -/** @defgroup auxdat Auxiliary Data Structures @ingroup datas \brief Auxiliary data structures implemented in LEMON. @@ -472,19 +464,19 @@ function. LEMON contains three algorithms for solving the minimum mean cycle problem: -- \ref Karp "Karp"'s original algorithm \ref amo93networkflows, +- \ref KarpMmc Karp's original algorithm \ref amo93networkflows, \ref dasdan98minmeancycle. -- \ref HartmannOrlin "Hartmann-Orlin"'s algorithm, which is an improved +- \ref HartmannOrlinMmc Hartmann-Orlin's algorithm, which is an improved version of Karp's algorithm \ref dasdan98minmeancycle. -- \ref Howard "Howard"'s policy iteration algorithm +- \ref HowardMmc Howard's policy iteration algorithm \ref dasdan98minmeancycle. -In practice, the Howard algorithm proved to be by far the most efficient -one, though the best known theoretical bound on its running time is -exponential. -Both Karp and HartmannOrlin algorithms run in time O(ne) and use space -O(n2+e), but the latter one is typically faster due to the -applied early termination scheme. +In practice, the \ref HowardMmc "Howard" algorithm proved to be by far the +most efficient one, though the best known theoretical bound on its running +time is exponential. +Both \ref KarpMmc "Karp" and \ref HartmannOrlinMmc "Hartmann-Orlin" algorithms +run in time O(ne) and use space O(n2+e), but the latter one is +typically faster due to the applied early termination scheme. */ /** diff -r 2b6bffe0e7e8 -r a1fd7008a052 lemon/arg_parser.h --- a/lemon/arg_parser.h Tue Dec 20 18:15:14 2011 +0100 +++ b/lemon/arg_parser.h Tue Dec 20 18:15:38 2011 +0100 @@ -35,12 +35,19 @@ namespace lemon { ///Exception used by ArgParser + + ///Exception used by ArgParser. + /// class ArgParserException : public Exception { public: + /// Reasons for failure + + /// Reasons for failure. + /// enum Reason { - HELP, /// --help option was given - UNKNOWN_OPT, /// Unknown option was given - INVALID_OPT /// Invalid combination of options + HELP, ///< --help option was given. + UNKNOWN_OPT, ///< Unknown option was given. + INVALID_OPT ///< Invalid combination of options. }; private: diff -r 2b6bffe0e7e8 -r a1fd7008a052 lemon/bellman_ford.h --- a/lemon/bellman_ford.h Tue Dec 20 18:15:14 2011 +0100 +++ b/lemon/bellman_ford.h Tue Dec 20 18:15:38 2011 +0100 @@ -28,27 +28,24 @@ #include #include #include -#include #include #include namespace lemon { - /// \brief Default operation traits for the BellmanFord algorithm class. + /// \brief Default OperationTraits for the BellmanFord algorithm class. /// /// This operation traits class defines all computational operations /// and constants that are used in the Bellman-Ford algorithm. /// The default implementation is based on the \c numeric_limits class. /// If the numeric type does not have infinity value, then the maximum /// value is used as extremal infinity value. - /// - /// \see BellmanFordToleranceOperationTraits template < typename V, bool has_inf = std::numeric_limits::has_infinity> struct BellmanFordDefaultOperationTraits { - /// \brief Value type for the algorithm. + /// \e typedef V Value; /// \brief Gives back the zero value of the type. static Value zero() { @@ -87,51 +84,6 @@ } }; - /// \brief Operation traits for the BellmanFord algorithm class - /// using tolerance. - /// - /// This operation traits class defines all computational operations - /// and constants that are used in the Bellman-Ford algorithm. - /// The only difference between this implementation and - /// \ref BellmanFordDefaultOperationTraits is that this class uses - /// the \ref Tolerance "tolerance technique" in its \ref less() - /// function. - /// - /// \tparam V The value type. - /// \tparam eps The epsilon value for the \ref less() function. - /// By default, it is the epsilon value used by \ref Tolerance - /// "Tolerance". - /// - /// \see BellmanFordDefaultOperationTraits -#ifdef DOXYGEN - template -#else - template < - typename V, - V eps = Tolerance::def_epsilon> -#endif - struct BellmanFordToleranceOperationTraits { - /// \brief Value type for the algorithm. - typedef V Value; - /// \brief Gives back the zero value of the type. - static Value zero() { - return static_cast(0); - } - /// \brief Gives back the positive infinity value of the type. - static Value infinity() { - return std::numeric_limits::infinity(); - } - /// \brief Gives back the sum of the given two elements. - static Value plus(const Value& left, const Value& right) { - return left + right; - } - /// \brief Gives back \c true only if the first value is less than - /// the second. - static bool less(const Value& left, const Value& right) { - return left + eps < right; - } - }; - /// \brief Default traits class of BellmanFord class. /// /// Default traits class of BellmanFord class. @@ -155,8 +107,7 @@ /// /// It defines the used operations and the infinity value for the /// given \c Value type. - /// \see BellmanFordDefaultOperationTraits, - /// BellmanFordToleranceOperationTraits + /// \see BellmanFordDefaultOperationTraits typedef BellmanFordDefaultOperationTraits OperationTraits; /// \brief The type of the map that stores the last arcs of the @@ -886,8 +837,7 @@ /// /// It defines the used operations and the infinity value for the /// given \c Value type. - /// \see BellmanFordDefaultOperationTraits, - /// BellmanFordToleranceOperationTraits + /// \see BellmanFordDefaultOperationTraits typedef BellmanFordDefaultOperationTraits OperationTraits; /// \brief The type of the map that stores the last diff -r 2b6bffe0e7e8 -r a1fd7008a052 lemon/hartmann_orlin_mmc.h --- a/lemon/hartmann_orlin_mmc.h Tue Dec 20 18:15:14 2011 +0100 +++ b/lemon/hartmann_orlin_mmc.h Tue Dec 20 18:15:38 2011 +0100 @@ -38,7 +38,7 @@ /// Default traits class of HartmannOrlinMmc class. /// \tparam GR The type of the digraph. /// \tparam CM The type of the cost map. - /// It must conform to the \ref concepts::Rea_data "Rea_data" concept. + /// It must conform to the \ref concepts::ReadMap "ReadMap" concept. #ifdef DOXYGEN template #else @@ -99,7 +99,7 @@ /// This class implements the Hartmann-Orlin algorithm for finding /// a directed cycle of minimum mean cost in a digraph /// \ref amo93networkflows, \ref dasdan98minmeancycle. - /// It is an improved version of \ref Karp "Karp"'s original algorithm, + /// It is an improved version of \ref KarpMmc "Karp"'s original algorithm, /// it applies an efficient early termination scheme. /// It runs in time O(ne) and uses space O(n2+e). /// diff -r 2b6bffe0e7e8 -r a1fd7008a052 test/bellman_ford_test.cc --- a/test/bellman_ford_test.cc Tue Dec 20 18:15:14 2011 +0100 +++ b/test/bellman_ford_test.cc Tue Dec 20 18:15:38 2011 +0100 @@ -104,7 +104,6 @@ BF::SetPredMap > ::SetDistMap > ::SetOperationTraits > - ::SetOperationTraits > ::Create bf_test(gr,length); LengthMap length_map;