Merge
authorAlpar Juttner <alpar@cs.elte.hu>
Tue, 23 Sep 2008 18:42:49 +0200
changeset 2796307bbbf285b
parent 278 931190050520
parent 277 7abfb55f1ecc
child 281 e9b4fbe163f5
child 282 dc9e8d2c0df9
child 286 da414906fe21
Merge
     1.1 --- a/CMakeLists.txt	Mon Sep 22 15:33:23 2008 +0200
     1.2 +++ b/CMakeLists.txt	Tue Sep 23 18:42:49 2008 +0200
     1.3 @@ -1,16 +1,7 @@
     1.4  CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
     1.5  
     1.6 -#EXECUTE_PROCESS(
     1.7 -#  COMMAND hg id -i
     1.8 -#  OUTPUT_VARIABLE HG_REVISION
     1.9 -#  OUTPUT_STRIP_TRAILING_WHITESPACE)
    1.10 -
    1.11  SET(PROJECT_NAME "LEMON")
    1.12 -SET(PROJECT_VERSION_MAJOR "0")
    1.13 -SET(PROJECT_VERSION_MINOR "99")
    1.14 -SET(PROJECT_VERSION_PATCH "0")
    1.15 -SET(PROJECT_VERSION
    1.16 -  "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}")
    1.17 +SET(PROJECT_VERSION "hg-tip" CACHE STRING "The version string.")
    1.18  
    1.19  PROJECT(${PROJECT_NAME})
    1.20  
    1.21 @@ -39,15 +30,12 @@
    1.22      "LEMON - Library of Efficient Models and Optimization in Networks")
    1.23    SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE")
    1.24  
    1.25 -  SET(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR})
    1.26 -  SET(CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR})
    1.27 -  SET(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH})
    1.28    SET(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
    1.29  
    1.30    SET(CPACK_PACKAGE_INSTALL_DIRECTORY
    1.31 -    "${PROJECT_NAME} ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
    1.32 +    "${PROJECT_NAME} ${PROJECT_VERSION}")
    1.33    SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY
    1.34 -    "${PROJECT_NAME} ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}")
    1.35 +    "${PROJECT_NAME} ${PROJECT_VERSION}")
    1.36  
    1.37    # Variables to generate a component-based installer.
    1.38    #SET(CPACK_COMPONENTS_ALL headers library html_documentation)
     2.1 --- a/NEWS	Mon Sep 22 15:33:23 2008 +0200
     2.2 +++ b/NEWS	Tue Sep 23 18:42:49 2008 +0200
     2.3 @@ -0,0 +1,49 @@
     2.4 +20XX-XX-XX Version 1.0 released
     2.5 +
     2.6 +	This is the first stable release of LEMON. Compared to the 0.x
     2.7 +	release series, it features a considerably smaller but more
     2.8 +	matured set of tools. The API has also completely revised and
     2.9 +	changed in several places.
    2.10 +
    2.11 +	* The major name changes compared to the 0.x series
    2.12 +          * Graph -> Digraph, UGraph -> Graph
    2.13 +          * Edge -> Arc, UEdge -> Edge
    2.14 +	  * source(UEdge)/target(UEdge) -> u(Edge)/v(Edge)
    2.15 +	* Other improvements
    2.16 +	  * Better documentation
    2.17 +	  * Reviewed and cleaned up codebase
    2.18 +	  * CMake based build system (along with the autotools based one)
    2.19 +	* Contents of the library (ported from 0.x)
    2.20 +	  * Algorithms
    2.21 +       	    * breadth-first search (bfs.h)
    2.22 +       	    * depth-first search (dfs.h)
    2.23 +       	    * Dijkstra's algorithm (dijkstra.h)
    2.24 +       	    * Kruskal's algorithm (kruskal.h)
    2.25 +    	  * Data structures
    2.26 +       	    * graph data structures (list_graph.h, smart_graph.h)
    2.27 +       	    * path data structures (path.h)
    2.28 +       	    * binary heap data structure (bin_heap.h)
    2.29 +       	    * union-find data structures (unionfind.h)
    2.30 +       	    * miscellaneous property maps (maps.h)
    2.31 +       	    * two dimensional vector and bounding box (dim2.h)
    2.32 +          * Concepts
    2.33 +       	    * graph structure concepts (concepts/digraph.h, concepts/graph.h,
    2.34 +              concepts/graph_components.h)
    2.35 +       	    * concepts for other structures (concepts/heap.h, concepts/maps.h,
    2.36 +	      concepts/path.h)
    2.37 +    	  * Tools
    2.38 +       	    * Mersenne twister random number generator (random.h)
    2.39 +       	    * tools for measuring cpu and wall clock time (time_measure.h)
    2.40 +       	    * tools for counting steps and events (counter.h)
    2.41 +       	    * tool for parsing command line arguments (arg_parser.h)
    2.42 +       	    * tool for visualizing graphs (graph_to_eps.h)
    2.43 +       	    * tools for reading and writing data in LEMON Graph Format
    2.44 +              (lgf_reader.h, lgf_writer.h)
    2.45 +            * tools to handle the anomalies of calculations with
    2.46 +	      floating point numbers (tolerance.h)
    2.47 +            * tools to manage RGB colors (color.h)
    2.48 +    	  * Infrastructure
    2.49 +       	    * extended assertion handling (assert.h)
    2.50 +       	    * exception classes and error handling (error.h)
    2.51 +      	    * concept checking (concept_check.h)
    2.52 +       	    * commonly used mathematical constants (math.h)
     3.1 --- a/configure.ac	Mon Sep 22 15:33:23 2008 +0200
     3.2 +++ b/configure.ac	Tue Sep 23 18:42:49 2008 +0200
     3.3 @@ -1,9 +1,15 @@
     3.4  dnl Process this file with autoconf to produce a configure script.
     3.5  
     3.6  dnl Version information.
     3.7 -m4_define([lemon_version_number], [])
     3.8 +m4_define([lemon_version_number],
     3.9 +	[m4_normalize(esyscmd([echo ${LEMON_VERSION}]))])
    3.10 +dnl m4_define([lemon_version_number], [])
    3.11 +m4_define([lemon_hg_path], [m4_normalize(esyscmd([./scripts/chg-len.py]))])
    3.12  m4_define([lemon_hg_revision], [m4_normalize(esyscmd([hg id -i]))])
    3.13 -m4_define([lemon_version], [ifelse(lemon_version_number(), [], [lemon_hg_revision()], [lemon_version_number()])])
    3.14 +m4_define([lemon_version], [ifelse(lemon_version_number(),
    3.15 +			   [],
    3.16 +			   [lemon_hg_path().lemon_hg_revision()],
    3.17 +			   [lemon_version_number()])])
    3.18  
    3.19  AC_PREREQ([2.59])
    3.20  AC_INIT([LEMON], [lemon_version()], [lemon-user@lemon.cs.elte.hu], [lemon])
     4.1 --- a/doc/Makefile.am	Mon Sep 22 15:33:23 2008 +0200
     4.2 +++ b/doc/Makefile.am	Tue Sep 23 18:42:49 2008 +0200
     4.3 @@ -6,6 +6,7 @@
     4.4  	doc/lgf.dox \
     4.5  	doc/license.dox \
     4.6  	doc/mainpage.dox \
     4.7 +	doc/named-param.dox \
     4.8  	doc/namespaces.dox \
     4.9  	doc/html \
    4.10  	doc/CMakeLists.txt
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/doc/named-param.dox	Tue Sep 23 18:42:49 2008 +0200
     5.3 @@ -0,0 +1,119 @@
     5.4 +/* -*- mode: C++; indent-tabs-mode: nil; -*-
     5.5 + *
     5.6 + * This file is a part of LEMON, a generic C++ optimization library.
     5.7 + *
     5.8 + * Copyright (C) 2003-2008
     5.9 + * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    5.10 + * (Egervary Research Group on Combinatorial Optimization, EGRES).
    5.11 + *
    5.12 + * Permission to use, modify and distribute this software is granted
    5.13 + * provided that this copyright notice appears in all copies. For
    5.14 + * precise terms see the accompanying LICENSE file.
    5.15 + *
    5.16 + * This software is provided "AS IS" with no warranty of any kind,
    5.17 + * express or implied, and with no claim as to its suitability for any
    5.18 + * purpose.
    5.19 + *
    5.20 + */
    5.21 +
    5.22 +/*!
    5.23 +
    5.24 +\page named-param Named Parameters
    5.25 +
    5.26 +\section named-func-param Named Function Parameters
    5.27 +
    5.28 +Several modern languages provide a convenient way to refer the
    5.29 +function parameters by name also when you call the function. It is
    5.30 +especially comfortable in case of a function having tons of parameters
    5.31 +with natural default values. Sadly, C++ lack this amenity.
    5.32 +
    5.33 +However, with a crafty trick and with some little
    5.34 +inconvenience, it is possible to emulate is.
    5.35 +The example below shows how to do it.
    5.36 +
    5.37 +\code
    5.38 +class namedFn
    5.39 +{
    5.40 +  int _id;
    5.41 +  double _val;
    5.42 +  int _dim;
    5.43 +
    5.44 +  public:
    5.45 +  namedFn() : _id(0), _val(1), _dim(2) {}
    5.46 +  namedFn& id(int p)     { _id  = p ; return *this; }
    5.47 +  namedFn& val(double p) { _val = p ; return *this; }
    5.48 +  namedFn& dim(int p)    { _dim = p ; return *this; }
    5.49 +
    5.50 +  run() {
    5.51 +    std::cout << "Here comes the function itself\n" <<
    5.52 +              << "With parameters "
    5.53 +              << _id << ", " << _val << ", " << _dim << std::endl;
    5.54 +  }
    5.55 +};
    5.56 +\endcode
    5.57 +
    5.58 +Then you can use it like this.
    5.59 +
    5.60 +\code
    5.61 +namedFn().id(3).val(2).run();
    5.62 +\endcode
    5.63 +
    5.64 +The trick is obvious, each "named parameter" changes one component of
    5.65 +the underlying class, then gives back a reference to it. Finally,
    5.66 +<tt>run()</tt> executes the algorithm itself.
    5.67 +
    5.68 +\note Although it is a class, namedFn is used pretty much like as it were
    5.69 +a function. That it why we called it namedFn instead of \c NamedFn.
    5.70 +
    5.71 +\note In fact, the final <tt>.run()</tt> could be made unnecessary,
    5.72 +because the algorithm could also be implemented in the destructor of
    5.73 +\c namedFn instead. This however would make it impossible to implement
    5.74 +functions with return values, and would also cause serious problems when
    5.75 +implementing \ref named-templ-func-param "named template parameters".
    5.76 +<b>Therefore, by convention, <tt>.run()</tt> must be used
    5.77 +explicitly to execute a function having named parameters
    5.78 +everywhere in LEMON.</b>
    5.79 +
    5.80 +\section named-templ-func-param Named Function Template Parameters
    5.81 +
    5.82 +A named parameter can also be a template function. The usage is
    5.83 +exactly the same, but the implementation behind is a kind of black
    5.84 +magic and they are the dirtiest part of the LEMON code.
    5.85 +
    5.86 +You will probably never need to know how it works, but if you really
    5.87 +committed, have a look at \ref lemon/graph_to_eps.h for an example.
    5.88 +
    5.89 +\section traits-classes Traits Classes
    5.90 +
    5.91 +A similar game can also be played when defining classes. In this case
    5.92 +the type of the class attributes can be changed. Initially we have to
    5.93 +define a special class called <em>Traits Class</em> defining the
    5.94 +default type of the attributes. Then the types of these attributes can
    5.95 +be changed in the same way as described in the next section.
    5.96 +
    5.97 +See \ref lemon::DijkstraDefaultTraits for an
    5.98 +example how a traits class implementation looks like.
    5.99 +
   5.100 +\section named-templ-param Named Class Template Parameters
   5.101 +
   5.102 +If we would like to change the type of an attribute in a class that
   5.103 +was instantiated by using a traits class as a template parameter, and
   5.104 +the class contains named parameters, we do not have to instantiate again
   5.105 +the class with new traits class, but instead adaptor classes can
   5.106 +be used as shown in the following example.
   5.107 +
   5.108 +\code
   5.109 +Dijkstra<>::SetPredMap<NullMap<Node,Arc> >::Create
   5.110 +\endcode
   5.111 +
   5.112 +It can also be used in conjunction with other named template
   5.113 +parameters in arbitrary order.
   5.114 +
   5.115 +\code
   5.116 +Dijkstra<>::SetDistMap<MyMap>::SetPredMap<NullMap<Node,Arc> >::Create
   5.117 +\endcode
   5.118 +
   5.119 +The result will be an instantiated Dijkstra class, in which the
   5.120 +DistMap and the PredMap is modified.
   5.121 +
   5.122 +*/
     6.1 --- a/lemon/arg_parser.h	Mon Sep 22 15:33:23 2008 +0200
     6.2 +++ b/lemon/arg_parser.h	Tue Sep 23 18:42:49 2008 +0200
     6.3 @@ -16,8 +16,8 @@
     6.4   *
     6.5   */
     6.6  
     6.7 -#ifndef LEMON_ARG_PARSER
     6.8 -#define LEMON_ARG_PARSER
     6.9 +#ifndef LEMON_ARG_PARSER_H
    6.10 +#define LEMON_ARG_PARSER_H
    6.11  
    6.12  #include <vector>
    6.13  #include <map>
    6.14 @@ -382,4 +382,4 @@
    6.15    };
    6.16  }
    6.17  
    6.18 -#endif // LEMON_ARG_PARSER
    6.19 +#endif // LEMON_ARG_PARSER_H
     7.1 --- a/lemon/assert.h	Mon Sep 22 15:33:23 2008 +0200
     7.2 +++ b/lemon/assert.h	Tue Sep 23 18:42:49 2008 +0200
     7.3 @@ -27,8 +27,9 @@
     7.4  
     7.5  namespace lemon {
     7.6  
     7.7 -  inline void assert_fail_log(const char *file, int line, const char *function,
     7.8 -                              const char *message, const char *assertion)
     7.9 +  inline void assert_fail_abort(const char *file, int line,
    7.10 +                                const char *function, const char* message,
    7.11 +                                const char *assertion)
    7.12    {
    7.13      std::cerr << file << ":" << line << ": ";
    7.14      if (function)
    7.15 @@ -37,13 +38,6 @@
    7.16      if (assertion)
    7.17        std::cerr << " (assertion '" << assertion << "' failed)";
    7.18      std::cerr << std::endl;
    7.19 -  }
    7.20 -
    7.21 -  inline void assert_fail_abort(const char *file, int line,
    7.22 -                                const char *function, const char* message,
    7.23 -                                const char *assertion)
    7.24 -  {
    7.25 -    assert_fail_log(file, line, function, message, assertion);
    7.26      std::abort();
    7.27    }
    7.28  
    7.29 @@ -63,17 +57,14 @@
    7.30  #endif // LEMON_ASSERT_H
    7.31  
    7.32  #undef LEMON_ASSERT
    7.33 -#undef LEMON_FIXME
    7.34  #undef LEMON_DEBUG
    7.35  
    7.36 -#if (defined(LEMON_ASSERT_LOG) ? 1 : 0) +               \
    7.37 -  (defined(LEMON_ASSERT_ABORT) ? 1 : 0) +               \
    7.38 +#if (defined(LEMON_ASSERT_ABORT) ? 1 : 0) +               \
    7.39    (defined(LEMON_ASSERT_CUSTOM) ? 1 : 0) > 1
    7.40  #error "LEMON assertion system is not set properly"
    7.41  #endif
    7.42  
    7.43 -#if ((defined(LEMON_ASSERT_LOG) ? 1 : 0) +              \
    7.44 -     (defined(LEMON_ASSERT_ABORT) ? 1 : 0) +            \
    7.45 +#if ((defined(LEMON_ASSERT_ABORT) ? 1 : 0) +            \
    7.46       (defined(LEMON_ASSERT_CUSTOM) ? 1 : 0) == 1 ||     \
    7.47       defined(LEMON_ENABLE_ASSERTS)) &&                  \
    7.48    (defined(LEMON_DISABLE_ASSERTS) ||                    \
    7.49 @@ -82,10 +73,7 @@
    7.50  #endif
    7.51  
    7.52  
    7.53 -#if defined LEMON_ASSERT_LOG
    7.54 -#  undef LEMON_ASSERT_HANDLER
    7.55 -#  define LEMON_ASSERT_HANDLER ::lemon::assert_fail_log
    7.56 -#elif defined LEMON_ASSERT_ABORT
    7.57 +#if defined LEMON_ASSERT_ABORT
    7.58  #  undef LEMON_ASSERT_HANDLER
    7.59  #  define LEMON_ASSERT_HANDLER ::lemon::assert_fail_abort
    7.60  #elif defined LEMON_ASSERT_CUSTOM
    7.61 @@ -107,8 +95,10 @@
    7.62  #    define LEMON_FUNCTION_NAME (__PRETTY_FUNCTION__)
    7.63  #  elif defined _MSC_VER
    7.64  #    define LEMON_FUNCTION_NAME (__FUNCSIG__)
    7.65 +#  elif __STDC_VERSION__ >= 199901L
    7.66 +#    define LEMON_FUNCTION_NAME (__func__)
    7.67  #  else
    7.68 -#    define LEMON_FUNCTION_NAME (__func__)
    7.69 +#    define LEMON_FUNCTION_NAME ("<unknown>")
    7.70  #  endif
    7.71  #endif
    7.72  
    7.73 @@ -118,12 +108,12 @@
    7.74  ///
    7.75  /// \brief Macro for assertion with customizable message
    7.76  ///
    7.77 -/// Macro for assertion with customizable message.  \param exp An
    7.78 -/// expression that must be convertible to \c bool.  If it is \c
    7.79 -/// false, then an assertion is raised. The concrete behaviour depends
    7.80 -/// on the settings of the assertion system.  \param msg A <tt>const
    7.81 -/// char*</tt> parameter, which can be used to provide information
    7.82 -/// about the circumstances of the failed assertion.
    7.83 +/// Macro for assertion with customizable message.  
    7.84 +/// \param exp An expression that must be convertible to \c bool.  If it is \c
    7.85 +/// false, then an assertion is raised. The concrete behaviour depends on the
    7.86 +/// settings of the assertion system.
    7.87 +/// \param msg A <tt>const char*</tt> parameter, which can be used to provide
    7.88 +/// information about the circumstances of the failed assertion.
    7.89  ///
    7.90  /// The assertions are enabled in the default behaviour.
    7.91  /// You can disable them with the following code:
    7.92 @@ -137,17 +127,12 @@
    7.93  /// \endcode
    7.94  /// The checking is also disabled when the standard macro \c NDEBUG is defined.
    7.95  ///
    7.96 -/// The LEMON assertion system has a wide range of customization
    7.97 -/// properties. As a default behaviour the failed assertion prints a
    7.98 -/// short log message to the standard error and aborts the execution.
    7.99 +/// As a default behaviour the failed assertion prints a short log message to
   7.100 +/// the standard error and aborts the execution.
   7.101  ///
   7.102 -/// The following modes can be used in the assertion system:
   7.103 -///
   7.104 -/// - \c LEMON_ASSERT_LOG The failed assertion prints a short log
   7.105 -///   message to the standard error and continues the execution.
   7.106 -/// - \c LEMON_ASSERT_ABORT This mode is similar to the \c
   7.107 -///   LEMON_ASSERT_LOG, but it aborts the program. It is the default
   7.108 -///   behaviour.
   7.109 +/// However, the following modes can be used in the assertion system:
   7.110 +/// - \c LEMON_ASSERT_ABORT The failed assertion prints a short log message to
   7.111 +///   the standard error and aborts the program. It is the default behaviour.
   7.112  /// - \c LEMON_ASSERT_CUSTOM The user can define own assertion handler
   7.113  ///   function.
   7.114  ///   \code
   7.115 @@ -175,22 +160,6 @@
   7.116  
   7.117  /// \ingroup exceptions
   7.118  ///
   7.119 -/// \brief Macro for mark not yet implemented features.
   7.120 -///
   7.121 -/// Macro for mark not yet implemented features and outstanding bugs.
   7.122 -/// It is close to be the shortcut of the following code:
   7.123 -/// \code
   7.124 -///   LEMON_ASSERT(false, msg);
   7.125 -/// \endcode
   7.126 -///
   7.127 -/// \see LEMON_ASSERT
   7.128 -#  define LEMON_FIXME(msg)                                              \
   7.129 -  (LEMON_ASSERT_HANDLER(__FILE__, __LINE__, LEMON_FUNCTION_NAME,        \
   7.130 -                        ::lemon::_assert_bits::cstringify(msg),         \
   7.131 -                        static_cast<const char*>(0)))
   7.132 -
   7.133 -/// \ingroup exceptions
   7.134 -///
   7.135  /// \brief Macro for internal assertions
   7.136  ///
   7.137  /// Macro for internal assertions, it is used in the library to check
   7.138 @@ -222,7 +191,6 @@
   7.139  
   7.140  #  ifndef LEMON_ASSERT_HANDLER
   7.141  #    define LEMON_ASSERT(exp, msg)  (static_cast<void>(0))
   7.142 -#    define LEMON_FIXME(msg) (static_cast<void>(0))
   7.143  #    define LEMON_DEBUG(exp, msg) (static_cast<void>(0))
   7.144  #  else
   7.145  #    define LEMON_ASSERT(exp, msg)                                      \
   7.146 @@ -231,11 +199,6 @@
   7.147                               LEMON_FUNCTION_NAME,                       \
   7.148                               ::lemon::_assert_bits::cstringify(msg),    \
   7.149                               #exp), 0)))
   7.150 -#    define LEMON_FIXME(msg)                                            \
   7.151 -       (LEMON_ASSERT_HANDLER(__FILE__, __LINE__, LEMON_FUNCTION_NAME,   \
   7.152 -                             ::lemon::_assert_bits::cstringify(msg),    \
   7.153 -                             static_cast<const char*>(0)))
   7.154 -
   7.155  #    if LEMON_ENABLE_DEBUG
   7.156  #      define LEMON_DEBUG(exp, msg)                                     \
   7.157           (static_cast<void> (!!(exp) ? 0 : (                            \
     8.1 --- a/lemon/bits/array_map.h	Mon Sep 22 15:33:23 2008 +0200
     8.2 +++ b/lemon/bits/array_map.h	Tue Sep 23 18:42:49 2008 +0200
     8.3 @@ -103,6 +103,7 @@
     8.4        }
     8.5      }
     8.6  
     8.7 +  private:
     8.8      /// \brief Constructor to copy a map of the same map type.
     8.9      ///
    8.10      /// Constructor to copy a map of the same map type.
    8.11 @@ -150,6 +151,7 @@
    8.12        return *this;
    8.13      }
    8.14  
    8.15 +  public:
    8.16      /// \brief The destructor of the map.
    8.17      ///
    8.18      /// The destructor of the map.
     9.1 --- a/lemon/bits/graph_extender.h	Mon Sep 22 15:33:23 2008 +0200
     9.2 +++ b/lemon/bits/graph_extender.h	Tue Sep 23 18:42:49 2008 +0200
     9.3 @@ -227,6 +227,7 @@
     9.4        NodeMap(const Digraph& digraph, const _Value& value)
     9.5          : Parent(digraph, value) {}
     9.6  
     9.7 +    private:
     9.8        NodeMap& operator=(const NodeMap& cmap) {
     9.9          return operator=<NodeMap>(cmap);
    9.10        }
    9.11 @@ -251,6 +252,7 @@
    9.12        ArcMap(const Digraph& digraph, const _Value& value)
    9.13          : Parent(digraph, value) {}
    9.14  
    9.15 +    private:
    9.16        ArcMap& operator=(const ArcMap& cmap) {
    9.17          return operator=<ArcMap>(cmap);
    9.18        }
    9.19 @@ -608,6 +610,7 @@
    9.20        NodeMap(const Graph& graph, const _Value& value)
    9.21          : Parent(graph, value) {}
    9.22  
    9.23 +    private:
    9.24        NodeMap& operator=(const NodeMap& cmap) {
    9.25          return operator=<NodeMap>(cmap);
    9.26        }
    9.27 @@ -632,6 +635,7 @@
    9.28        ArcMap(const Graph& graph, const _Value& value)
    9.29          : Parent(graph, value) {}
    9.30  
    9.31 +    private:
    9.32        ArcMap& operator=(const ArcMap& cmap) {
    9.33          return operator=<ArcMap>(cmap);
    9.34        }
    9.35 @@ -657,6 +661,7 @@
    9.36        EdgeMap(const Graph& graph, const _Value& value)
    9.37          : Parent(graph, value) {}
    9.38  
    9.39 +    private:
    9.40        EdgeMap& operator=(const EdgeMap& cmap) {
    9.41          return operator=<EdgeMap>(cmap);
    9.42        }
    10.1 --- a/lemon/bits/map_extender.h	Mon Sep 22 15:33:23 2008 +0200
    10.2 +++ b/lemon/bits/map_extender.h	Tue Sep 23 18:42:49 2008 +0200
    10.3 @@ -62,6 +62,7 @@
    10.4      MapExtender(const Graph& graph, const Value& value)
    10.5        : Parent(graph, value) {}
    10.6  
    10.7 +  private:
    10.8      MapExtender& operator=(const MapExtender& cmap) {
    10.9        return operator=<MapExtender>(cmap);
   10.10      }
   10.11 @@ -72,6 +73,7 @@
   10.12        return *this;
   10.13      }
   10.14  
   10.15 +  public:
   10.16      class MapIt : public Item {
   10.17      public:
   10.18  
   10.19 @@ -200,6 +202,7 @@
   10.20      SubMapExtender(const Graph& _graph, const Value& _value)
   10.21        : Parent(_graph, _value), graph(_graph) {}
   10.22  
   10.23 +  private:
   10.24      SubMapExtender& operator=(const SubMapExtender& cmap) {
   10.25        return operator=<MapExtender>(cmap);
   10.26      }
   10.27 @@ -214,6 +217,7 @@
   10.28        return *this;
   10.29      }
   10.30  
   10.31 +  public:
   10.32      class MapIt : public Item {
   10.33      public:
   10.34  
    11.1 --- a/lemon/bits/vector_map.h	Mon Sep 22 15:33:23 2008 +0200
    11.2 +++ b/lemon/bits/vector_map.h	Tue Sep 23 18:42:49 2008 +0200
    11.3 @@ -100,6 +100,7 @@
    11.4        container.resize(Parent::notifier()->maxId() + 1, value);
    11.5      }
    11.6  
    11.7 +  private:
    11.8      /// \brief Copy constructor
    11.9      ///
   11.10      /// Copy constructor.
    12.1 --- a/lemon/concepts/digraph.h	Mon Sep 22 15:33:23 2008 +0200
    12.2 +++ b/lemon/concepts/digraph.h	Tue Sep 23 18:42:49 2008 +0200
    12.3 @@ -434,6 +434,7 @@
    12.4          ///\e
    12.5          NodeMap(const Digraph&, T) { }
    12.6  
    12.7 +      private:
    12.8          ///Copy constructor
    12.9          NodeMap(const NodeMap& nm) : ReadWriteMap< Node, T >(nm) { }
   12.10          ///Assignment operator
   12.11 @@ -456,6 +457,7 @@
   12.12          ArcMap(const Digraph&) { }
   12.13          ///\e
   12.14          ArcMap(const Digraph&, T) { }
   12.15 +      private:
   12.16          ///Copy constructor
   12.17          ArcMap(const ArcMap& em) : ReadWriteMap<Arc,T>(em) { }
   12.18          ///Assignment operator
    13.1 --- a/lemon/concepts/graph.h	Mon Sep 22 15:33:23 2008 +0200
    13.2 +++ b/lemon/concepts/graph.h	Tue Sep 23 18:42:49 2008 +0200
    13.3 @@ -512,6 +512,7 @@
    13.4          ///\e
    13.5          NodeMap(const Graph&, T) { }
    13.6  
    13.7 +      private:
    13.8          ///Copy constructor
    13.9          NodeMap(const NodeMap& nm) : ReadWriteMap< Node, T >(nm) { }
   13.10          ///Assignment operator
   13.11 @@ -535,6 +536,7 @@
   13.12          ArcMap(const Graph&) { }
   13.13          ///\e
   13.14          ArcMap(const Graph&, T) { }
   13.15 +      private:
   13.16          ///Copy constructor
   13.17          ArcMap(const ArcMap& em) : ReadWriteMap<Arc,T>(em) { }
   13.18          ///Assignment operator
   13.19 @@ -558,6 +560,7 @@
   13.20          EdgeMap(const Graph&) { }
   13.21          ///\e
   13.22          EdgeMap(const Graph&, T) { }
   13.23 +      private:
   13.24          ///Copy constructor
   13.25          EdgeMap(const EdgeMap& em) : ReadWriteMap<Edge,T>(em) {}
   13.26          ///Assignment operator
    14.1 --- a/lemon/concepts/graph_components.h	Mon Sep 22 15:33:23 2008 +0200
    14.2 +++ b/lemon/concepts/graph_components.h	Tue Sep 23 18:42:49 2008 +0200
    14.3 @@ -1005,6 +1005,8 @@
    14.4        ///
    14.5        /// Construct a new map for the graph and initalise the values.
    14.6        GraphMap(const Graph&, const Value&) {}
    14.7 +
    14.8 +    private:
    14.9        /// \brief Copy constructor.
   14.10        ///
   14.11        /// Copy Constructor.
   14.12 @@ -1021,6 +1023,7 @@
   14.13          return *this;
   14.14        }
   14.15  
   14.16 +    public:
   14.17        template<typename _Map>
   14.18        struct Constraints {
   14.19          void constraints() {
   14.20 @@ -1030,13 +1033,14 @@
   14.21            // Constructor with a graph and a default value parameter
   14.22            _Map a2(g,t);
   14.23            // Copy constructor.
   14.24 -          _Map b(c);
   14.25 +          // _Map b(c);
   14.26  
   14.27 -          ReadMap<Key, Value> cmap;
   14.28 -          b = cmap;
   14.29 +          // ReadMap<Key, Value> cmap;
   14.30 +          // b = cmap;
   14.31  
   14.32 +          ignore_unused_variable_warning(a);
   14.33            ignore_unused_variable_warning(a2);
   14.34 -          ignore_unused_variable_warning(b);
   14.35 +          // ignore_unused_variable_warning(b);
   14.36          }
   14.37  
   14.38          const _Map &c;
   14.39 @@ -1082,6 +1086,7 @@
   14.40          NodeMap(const MappableDigraphComponent& digraph, const _Value& value)
   14.41            : Parent(digraph, value) {}
   14.42  
   14.43 +      private:
   14.44          /// \brief Copy constructor.
   14.45          ///
   14.46          /// Copy Constructor.
   14.47 @@ -1119,6 +1124,7 @@
   14.48          ArcMap(const MappableDigraphComponent& digraph, const _Value& value)
   14.49            : Parent(digraph, value) {}
   14.50  
   14.51 +      private:
   14.52          /// \brief Copy constructor.
   14.53          ///
   14.54          /// Copy Constructor.
   14.55 @@ -1215,6 +1221,7 @@
   14.56          EdgeMap(const MappableGraphComponent& graph, const _Value& value)
   14.57            : Parent(graph, value) {}
   14.58  
   14.59 +      private:
   14.60          /// \brief Copy constructor.
   14.61          ///
   14.62          /// Copy Constructor.
    15.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    15.2 +++ b/scripts/chg-len.py	Tue Sep 23 18:42:49 2008 +0200
    15.3 @@ -0,0 +1,39 @@
    15.4 +#! /usr/bin/env python
    15.5 +
    15.6 +import sys
    15.7 +import os
    15.8 +
    15.9 +if len(sys.argv)>1 and sys.argv[1] in ["-h","--help"]:
   15.10 +    print """
   15.11 +This utility just prints the length of the longest path
   15.12 +in the revision graph from revison 0 to the current one.
   15.13 +"""
   15.14 +    exit(0)
   15.15 +plist = os.popen("hg parents --template='{rev}\n'").readlines()
   15.16 +if len(plist)>1:
   15.17 +    print "You are in the process of merging"
   15.18 +    exit(1)
   15.19 +PAR = int(plist[0])
   15.20 +
   15.21 +f = os.popen("hg log -r 0:tip --template='{rev} {parents}\n'").readlines()
   15.22 +REV = -1
   15.23 +lengths=[]
   15.24 +for l in f:
   15.25 +    REV+=1
   15.26 +    s = l.split()
   15.27 +    rev = int(s[0])
   15.28 +    if REV != rev:
   15.29 +        print "Something is seriously wrong"
   15.30 +        exit(1)
   15.31 +    if len(s) == 1:
   15.32 +        par1 = par2 = rev - 1
   15.33 +    elif len(s) == 2:
   15.34 +        par1 = par2 = int(s[1].split(":")[0])
   15.35 +    else:
   15.36 +        par1 = int(s[1].split(":")[0])
   15.37 +        par2 = int(s[2].split(":")[0])
   15.38 +    if rev == 0:
   15.39 +        lengths.append(0)
   15.40 +    else:
   15.41 +        lengths.append(max(lengths[par1],lengths[par2])+1)
   15.42 +print lengths[PAR]
    16.1 --- a/test/error_test.cc	Mon Sep 22 15:33:23 2008 +0200
    16.2 +++ b/test/error_test.cc	Tue Sep 23 18:42:49 2008 +0200
    16.3 @@ -47,14 +47,9 @@
    16.4    LEMON_ASSERT(false, "This is a fault message");
    16.5  }
    16.6  
    16.7 -void fixme_disable() {
    16.8 -  LEMON_FIXME("fixme_disable() is fixme!");
    16.9 -}
   16.10 -
   16.11  void check_assertion_disable() {
   16.12    no_assertion_text_disable();
   16.13    assertion_text_disable();
   16.14 -  fixme_disable();
   16.15  }
   16.16  #undef LEMON_DISABLE_ASSERTS
   16.17  
   16.18 @@ -78,15 +73,10 @@
   16.19    LEMON_ASSERT(false, "This is a fault message");
   16.20  }
   16.21  
   16.22 -void fixme_custom() {
   16.23 -  LEMON_FIXME("fixme_custom() is fixme!");
   16.24 -}
   16.25 -
   16.26  void check_assertion_custom() {
   16.27    no_assertion_text_custom();
   16.28    assertion_text_custom();
   16.29 -  fixme_custom();
   16.30 -  check(cnt == 2, "The custom assert handler does not work");
   16.31 +  check(cnt == 1, "The custom assert handler does not work");
   16.32  }
   16.33  
   16.34  #undef LEMON_ASSERT_CUSTOM
    17.1 --- a/test/graph_test.h	Mon Sep 22 15:33:23 2008 +0200
    17.2 +++ b/test/graph_test.h	Tue Sep 23 18:42:49 2008 +0200
    17.3 @@ -212,10 +212,10 @@
    17.4      }
    17.5      check(s == 0, "Wrong sum.");
    17.6  
    17.7 -    map = constMap<Node>(12);
    17.8 -    for (NodeIt it(G); it != INVALID; ++it) {
    17.9 -      check(map[it] == 12, "Wrong operator[].");
   17.10 -    }
   17.11 +    // map = constMap<Node>(12);
   17.12 +    // for (NodeIt it(G); it != INVALID; ++it) {
   17.13 +    //   check(map[it] == 12, "Wrong operator[].");
   17.14 +    // }
   17.15    }
   17.16  
   17.17    template <typename Graph>
   17.18 @@ -242,10 +242,10 @@
   17.19      }
   17.20      check(s == 0, "Wrong sum.");
   17.21  
   17.22 -    map = constMap<Arc>(12);
   17.23 -    for (ArcIt it(G); it != INVALID; ++it) {
   17.24 -      check(map[it] == 12, "Wrong operator[].");
   17.25 -    }
   17.26 +    // map = constMap<Arc>(12);
   17.27 +    // for (ArcIt it(G); it != INVALID; ++it) {
   17.28 +    //   check(map[it] == 12, "Wrong operator[].");
   17.29 +    // }
   17.30    }
   17.31  
   17.32    template <typename Graph>
   17.33 @@ -272,10 +272,10 @@
   17.34      }
   17.35      check(s == 0, "Wrong sum.");
   17.36  
   17.37 -    map = constMap<Edge>(12);
   17.38 -    for (EdgeIt it(G); it != INVALID; ++it) {
   17.39 -      check(map[it] == 12, "Wrong operator[].");
   17.40 -    }
   17.41 +    // map = constMap<Edge>(12);
   17.42 +    // for (EdgeIt it(G); it != INVALID; ++it) {
   17.43 +    //   check(map[it] == 12, "Wrong operator[].");
   17.44 +    // }
   17.45    }
   17.46  
   17.47