# HG changeset patch # User Alpar Juttner # Date 2008-09-23 18:42:49 # Node ID 6307bbbf285b3f46e46905f1647b5892ef680e0d # Parent 93119005052016a1a5c54056a2e8cfb9769ab935 # Parent 7abfb55f1ecc813ea33ff03ec3f5e909d1e738b2 Merge diff --git a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,16 +1,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.6) -#EXECUTE_PROCESS( -# COMMAND hg id -i -# OUTPUT_VARIABLE HG_REVISION -# OUTPUT_STRIP_TRAILING_WHITESPACE) - SET(PROJECT_NAME "LEMON") -SET(PROJECT_VERSION_MAJOR "0") -SET(PROJECT_VERSION_MINOR "99") -SET(PROJECT_VERSION_PATCH "0") -SET(PROJECT_VERSION - "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}") +SET(PROJECT_VERSION "hg-tip" CACHE STRING "The version string.") PROJECT(${PROJECT_NAME}) @@ -39,15 +30,12 @@ "LEMON - Library of Efficient Models and Optimization in Networks") SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE") - SET(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR}) - SET(CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR}) - SET(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH}) SET(CPACK_PACKAGE_VERSION ${PROJECT_VERSION}) SET(CPACK_PACKAGE_INSTALL_DIRECTORY - "${PROJECT_NAME} ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}") + "${PROJECT_NAME} ${PROJECT_VERSION}") SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY - "${PROJECT_NAME} ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}") + "${PROJECT_NAME} ${PROJECT_VERSION}") # Variables to generate a component-based installer. #SET(CPACK_COMPONENTS_ALL headers library html_documentation) diff --git a/NEWS b/NEWS --- a/NEWS +++ b/NEWS @@ -0,0 +1,49 @@ +20XX-XX-XX 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. + + * The major name changes compared to the 0.x series + * 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) + * Concepts + * 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 + (lgf_reader.h, lgf_writer.h) + * tools to handle the anomalies of calculations with + 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) diff --git a/configure.ac b/configure.ac --- a/configure.ac +++ b/configure.ac @@ -1,9 +1,15 @@ dnl Process this file with autoconf to produce a configure script. dnl Version information. -m4_define([lemon_version_number], []) +m4_define([lemon_version_number], + [m4_normalize(esyscmd([echo ${LEMON_VERSION}]))]) +dnl m4_define([lemon_version_number], []) +m4_define([lemon_hg_path], [m4_normalize(esyscmd([./scripts/chg-len.py]))]) m4_define([lemon_hg_revision], [m4_normalize(esyscmd([hg id -i]))]) -m4_define([lemon_version], [ifelse(lemon_version_number(), [], [lemon_hg_revision()], [lemon_version_number()])]) +m4_define([lemon_version], [ifelse(lemon_version_number(), + [], + [lemon_hg_path().lemon_hg_revision()], + [lemon_version_number()])]) AC_PREREQ([2.59]) AC_INIT([LEMON], [lemon_version()], [lemon-user@lemon.cs.elte.hu], [lemon]) diff --git a/doc/Makefile.am b/doc/Makefile.am --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -6,6 +6,7 @@ doc/lgf.dox \ doc/license.dox \ doc/mainpage.dox \ + doc/named-param.dox \ doc/namespaces.dox \ doc/html \ doc/CMakeLists.txt diff --git a/doc/named-param.dox b/doc/named-param.dox new file mode 100644 --- /dev/null +++ b/doc/named-param.dox @@ -0,0 +1,119 @@ +/* -*- mode: C++; indent-tabs-mode: nil; -*- + * + * This file is a part of LEMON, a generic C++ optimization library. + * + * Copyright (C) 2003-2008 + * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport + * (Egervary Research Group on Combinatorial Optimization, EGRES). + * + * Permission to use, modify and distribute this software is granted + * provided that this copyright notice appears in all copies. For + * precise terms see the accompanying LICENSE file. + * + * This software is provided "AS IS" with no warranty of any kind, + * express or implied, and with no claim as to its suitability for any + * purpose. + * + */ + +/*! + +\page named-param Named Parameters + +\section named-func-param Named Function Parameters + +Several modern languages provide a convenient way to refer the +function parameters by name also when you call the function. It is +especially comfortable in case of a function having tons of parameters +with natural default values. Sadly, C++ lack this amenity. + +However, with a crafty trick and with some little +inconvenience, it is possible to emulate is. +The example below shows how to do it. + +\code +class namedFn +{ + int _id; + double _val; + int _dim; + + public: + namedFn() : _id(0), _val(1), _dim(2) {} + namedFn& id(int p) { _id = p ; return *this; } + namedFn& val(double p) { _val = p ; return *this; } + namedFn& dim(int p) { _dim = p ; return *this; } + + run() { + std::cout << "Here comes the function itself\n" << + << "With parameters " + << _id << ", " << _val << ", " << _dim << std::endl; + } +}; +\endcode + +Then you can use it like this. + +\code +namedFn().id(3).val(2).run(); +\endcode + +The trick is obvious, each "named parameter" changes one component of +the underlying class, then gives back a reference to it. Finally, +run() executes the algorithm itself. + +\note Although it is a class, namedFn is used pretty much like as it were +a function. That it why we called it namedFn instead of \c NamedFn. + +\note In fact, the final .run() could be made unnecessary, +because the algorithm could also be implemented in the destructor of +\c namedFn instead. This however would make it impossible to implement +functions with return values, and would also cause serious problems when +implementing \ref named-templ-func-param "named template parameters". +Therefore, by convention, .run() must be used +explicitly to execute a function having named parameters +everywhere in LEMON. + +\section named-templ-func-param Named Function Template Parameters + +A named parameter can also be a template function. The usage is +exactly the same, but the implementation behind is a kind of black +magic and they are the dirtiest part of the LEMON code. + +You will probably never need to know how it works, but if you really +committed, have a look at \ref lemon/graph_to_eps.h for an example. + +\section traits-classes Traits Classes + +A similar game can also be played when defining classes. In this case +the type of the class attributes can be changed. Initially we have to +define a special class called Traits Class defining the +default type of the attributes. Then the types of these attributes can +be changed in the same way as described in the next section. + +See \ref lemon::DijkstraDefaultTraits for an +example how a traits class implementation looks like. + +\section named-templ-param Named Class Template Parameters + +If we would like to change the type of an attribute in a class that +was instantiated by using a traits class as a template parameter, and +the class contains named parameters, we do not have to instantiate again +the class with new traits class, but instead adaptor classes can +be used as shown in the following example. + +\code +Dijkstra<>::SetPredMap >::Create +\endcode + +It can also be used in conjunction with other named template +parameters in arbitrary order. + +\code +Dijkstra<>::SetDistMap::SetPredMap >::Create +\endcode + +The result will be an instantiated Dijkstra class, in which the +DistMap and the PredMap is modified. + +*/ diff --git a/lemon/arg_parser.h b/lemon/arg_parser.h --- a/lemon/arg_parser.h +++ b/lemon/arg_parser.h @@ -16,8 +16,8 @@ * */ -#ifndef LEMON_ARG_PARSER -#define LEMON_ARG_PARSER +#ifndef LEMON_ARG_PARSER_H +#define LEMON_ARG_PARSER_H #include #include @@ -382,4 +382,4 @@ }; } -#endif // LEMON_ARG_PARSER +#endif // LEMON_ARG_PARSER_H diff --git a/lemon/assert.h b/lemon/assert.h --- a/lemon/assert.h +++ b/lemon/assert.h @@ -27,8 +27,9 @@ namespace lemon { - inline void assert_fail_log(const char *file, int line, const char *function, - const char *message, const char *assertion) + inline void assert_fail_abort(const char *file, int line, + const char *function, const char* message, + const char *assertion) { std::cerr << file << ":" << line << ": "; if (function) @@ -37,13 +38,6 @@ if (assertion) std::cerr << " (assertion '" << assertion << "' failed)"; std::cerr << std::endl; - } - - inline void assert_fail_abort(const char *file, int line, - const char *function, const char* message, - const char *assertion) - { - assert_fail_log(file, line, function, message, assertion); std::abort(); } @@ -63,17 +57,14 @@ #endif // LEMON_ASSERT_H #undef LEMON_ASSERT -#undef LEMON_FIXME #undef LEMON_DEBUG -#if (defined(LEMON_ASSERT_LOG) ? 1 : 0) + \ - (defined(LEMON_ASSERT_ABORT) ? 1 : 0) + \ +#if (defined(LEMON_ASSERT_ABORT) ? 1 : 0) + \ (defined(LEMON_ASSERT_CUSTOM) ? 1 : 0) > 1 #error "LEMON assertion system is not set properly" #endif -#if ((defined(LEMON_ASSERT_LOG) ? 1 : 0) + \ - (defined(LEMON_ASSERT_ABORT) ? 1 : 0) + \ +#if ((defined(LEMON_ASSERT_ABORT) ? 1 : 0) + \ (defined(LEMON_ASSERT_CUSTOM) ? 1 : 0) == 1 || \ defined(LEMON_ENABLE_ASSERTS)) && \ (defined(LEMON_DISABLE_ASSERTS) || \ @@ -82,10 +73,7 @@ #endif -#if defined LEMON_ASSERT_LOG -# undef LEMON_ASSERT_HANDLER -# define LEMON_ASSERT_HANDLER ::lemon::assert_fail_log -#elif defined LEMON_ASSERT_ABORT +#if defined LEMON_ASSERT_ABORT # undef LEMON_ASSERT_HANDLER # define LEMON_ASSERT_HANDLER ::lemon::assert_fail_abort #elif defined LEMON_ASSERT_CUSTOM @@ -107,8 +95,10 @@ # define LEMON_FUNCTION_NAME (__PRETTY_FUNCTION__) # elif defined _MSC_VER # define LEMON_FUNCTION_NAME (__FUNCSIG__) +# elif __STDC_VERSION__ >= 199901L +# define LEMON_FUNCTION_NAME (__func__) # else -# define LEMON_FUNCTION_NAME (__func__) +# define LEMON_FUNCTION_NAME ("") # endif #endif @@ -118,12 +108,12 @@ /// /// \brief Macro for assertion with customizable message /// -/// Macro for assertion with customizable message. \param exp An -/// expression that must be convertible to \c bool. If it is \c -/// false, then an assertion is raised. The concrete behaviour depends -/// on the settings of the assertion system. \param msg A const -/// char* parameter, which can be used to provide information -/// about the circumstances of the failed assertion. +/// Macro for assertion with customizable message. +/// \param exp An expression that must be convertible to \c bool. If it is \c +/// false, then an assertion is raised. The concrete behaviour depends on the +/// settings of the assertion system. +/// \param msg A const char* parameter, which can be used to provide +/// information about the circumstances of the failed assertion. /// /// The assertions are enabled in the default behaviour. /// You can disable them with the following code: @@ -137,17 +127,12 @@ /// \endcode /// The checking is also disabled when the standard macro \c NDEBUG is defined. /// -/// The LEMON assertion system has a wide range of customization -/// properties. As a default behaviour the failed assertion prints a -/// short log message to the standard error and aborts the execution. +/// As a default behaviour the failed assertion prints a short log message to +/// the standard error and aborts the execution. /// -/// The following modes can be used in the assertion system: -/// -/// - \c LEMON_ASSERT_LOG The failed assertion prints a short log -/// message to the standard error and continues the execution. -/// - \c LEMON_ASSERT_ABORT This mode is similar to the \c -/// LEMON_ASSERT_LOG, but it aborts the program. It is the default -/// behaviour. +/// However, the following modes can be used in the assertion system: +/// - \c LEMON_ASSERT_ABORT The failed assertion prints a short log message to +/// the standard error and aborts the program. It is the default behaviour. /// - \c LEMON_ASSERT_CUSTOM The user can define own assertion handler /// function. /// \code @@ -175,22 +160,6 @@ /// \ingroup exceptions /// -/// \brief Macro for mark not yet implemented features. -/// -/// Macro for mark not yet implemented features and outstanding bugs. -/// It is close to be the shortcut of the following code: -/// \code -/// LEMON_ASSERT(false, msg); -/// \endcode -/// -/// \see LEMON_ASSERT -# define LEMON_FIXME(msg) \ - (LEMON_ASSERT_HANDLER(__FILE__, __LINE__, LEMON_FUNCTION_NAME, \ - ::lemon::_assert_bits::cstringify(msg), \ - static_cast(0))) - -/// \ingroup exceptions -/// /// \brief Macro for internal assertions /// /// Macro for internal assertions, it is used in the library to check @@ -222,7 +191,6 @@ # ifndef LEMON_ASSERT_HANDLER # define LEMON_ASSERT(exp, msg) (static_cast(0)) -# define LEMON_FIXME(msg) (static_cast(0)) # define LEMON_DEBUG(exp, msg) (static_cast(0)) # else # define LEMON_ASSERT(exp, msg) \ @@ -231,11 +199,6 @@ LEMON_FUNCTION_NAME, \ ::lemon::_assert_bits::cstringify(msg), \ #exp), 0))) -# define LEMON_FIXME(msg) \ - (LEMON_ASSERT_HANDLER(__FILE__, __LINE__, LEMON_FUNCTION_NAME, \ - ::lemon::_assert_bits::cstringify(msg), \ - static_cast(0))) - # if LEMON_ENABLE_DEBUG # define LEMON_DEBUG(exp, msg) \ (static_cast (!!(exp) ? 0 : ( \ diff --git a/lemon/bits/array_map.h b/lemon/bits/array_map.h --- a/lemon/bits/array_map.h +++ b/lemon/bits/array_map.h @@ -103,6 +103,7 @@ } } + private: /// \brief Constructor to copy a map of the same map type. /// /// Constructor to copy a map of the same map type. @@ -150,6 +151,7 @@ return *this; } + public: /// \brief The destructor of the map. /// /// The destructor of the map. diff --git a/lemon/bits/graph_extender.h b/lemon/bits/graph_extender.h --- a/lemon/bits/graph_extender.h +++ b/lemon/bits/graph_extender.h @@ -227,6 +227,7 @@ NodeMap(const Digraph& digraph, const _Value& value) : Parent(digraph, value) {} + private: NodeMap& operator=(const NodeMap& cmap) { return operator=(cmap); } @@ -251,6 +252,7 @@ ArcMap(const Digraph& digraph, const _Value& value) : Parent(digraph, value) {} + private: ArcMap& operator=(const ArcMap& cmap) { return operator=(cmap); } @@ -608,6 +610,7 @@ NodeMap(const Graph& graph, const _Value& value) : Parent(graph, value) {} + private: NodeMap& operator=(const NodeMap& cmap) { return operator=(cmap); } @@ -632,6 +635,7 @@ ArcMap(const Graph& graph, const _Value& value) : Parent(graph, value) {} + private: ArcMap& operator=(const ArcMap& cmap) { return operator=(cmap); } @@ -657,6 +661,7 @@ EdgeMap(const Graph& graph, const _Value& value) : Parent(graph, value) {} + private: EdgeMap& operator=(const EdgeMap& cmap) { return operator=(cmap); } diff --git a/lemon/bits/map_extender.h b/lemon/bits/map_extender.h --- a/lemon/bits/map_extender.h +++ b/lemon/bits/map_extender.h @@ -62,6 +62,7 @@ MapExtender(const Graph& graph, const Value& value) : Parent(graph, value) {} + private: MapExtender& operator=(const MapExtender& cmap) { return operator=(cmap); } @@ -72,6 +73,7 @@ return *this; } + public: class MapIt : public Item { public: @@ -200,6 +202,7 @@ SubMapExtender(const Graph& _graph, const Value& _value) : Parent(_graph, _value), graph(_graph) {} + private: SubMapExtender& operator=(const SubMapExtender& cmap) { return operator=(cmap); } @@ -214,6 +217,7 @@ return *this; } + public: class MapIt : public Item { public: diff --git a/lemon/bits/vector_map.h b/lemon/bits/vector_map.h --- a/lemon/bits/vector_map.h +++ b/lemon/bits/vector_map.h @@ -100,6 +100,7 @@ container.resize(Parent::notifier()->maxId() + 1, value); } + private: /// \brief Copy constructor /// /// Copy constructor. diff --git a/lemon/concepts/digraph.h b/lemon/concepts/digraph.h --- a/lemon/concepts/digraph.h +++ b/lemon/concepts/digraph.h @@ -434,6 +434,7 @@ ///\e NodeMap(const Digraph&, T) { } + private: ///Copy constructor NodeMap(const NodeMap& nm) : ReadWriteMap< Node, T >(nm) { } ///Assignment operator @@ -456,6 +457,7 @@ ArcMap(const Digraph&) { } ///\e ArcMap(const Digraph&, T) { } + private: ///Copy constructor ArcMap(const ArcMap& em) : ReadWriteMap(em) { } ///Assignment operator diff --git a/lemon/concepts/graph.h b/lemon/concepts/graph.h --- a/lemon/concepts/graph.h +++ b/lemon/concepts/graph.h @@ -512,6 +512,7 @@ ///\e NodeMap(const Graph&, T) { } + private: ///Copy constructor NodeMap(const NodeMap& nm) : ReadWriteMap< Node, T >(nm) { } ///Assignment operator @@ -535,6 +536,7 @@ ArcMap(const Graph&) { } ///\e ArcMap(const Graph&, T) { } + private: ///Copy constructor ArcMap(const ArcMap& em) : ReadWriteMap(em) { } ///Assignment operator @@ -558,6 +560,7 @@ EdgeMap(const Graph&) { } ///\e EdgeMap(const Graph&, T) { } + private: ///Copy constructor EdgeMap(const EdgeMap& em) : ReadWriteMap(em) {} ///Assignment operator diff --git a/lemon/concepts/graph_components.h b/lemon/concepts/graph_components.h --- a/lemon/concepts/graph_components.h +++ b/lemon/concepts/graph_components.h @@ -1005,6 +1005,8 @@ /// /// Construct a new map for the graph and initalise the values. GraphMap(const Graph&, const Value&) {} + + private: /// \brief Copy constructor. /// /// Copy Constructor. @@ -1021,6 +1023,7 @@ return *this; } + public: template struct Constraints { void constraints() { @@ -1030,13 +1033,14 @@ // Constructor with a graph and a default value parameter _Map a2(g,t); // Copy constructor. - _Map b(c); + // _Map b(c); - ReadMap cmap; - b = cmap; + // ReadMap cmap; + // b = cmap; + ignore_unused_variable_warning(a); ignore_unused_variable_warning(a2); - ignore_unused_variable_warning(b); + // ignore_unused_variable_warning(b); } const _Map &c; @@ -1082,6 +1086,7 @@ NodeMap(const MappableDigraphComponent& digraph, const _Value& value) : Parent(digraph, value) {} + private: /// \brief Copy constructor. /// /// Copy Constructor. @@ -1119,6 +1124,7 @@ ArcMap(const MappableDigraphComponent& digraph, const _Value& value) : Parent(digraph, value) {} + private: /// \brief Copy constructor. /// /// Copy Constructor. @@ -1215,6 +1221,7 @@ EdgeMap(const MappableGraphComponent& graph, const _Value& value) : Parent(graph, value) {} + private: /// \brief Copy constructor. /// /// Copy Constructor. diff --git a/scripts/chg-len.py b/scripts/chg-len.py new file mode 100755 --- /dev/null +++ b/scripts/chg-len.py @@ -0,0 +1,39 @@ +#! /usr/bin/env python + +import sys +import os + +if len(sys.argv)>1 and sys.argv[1] in ["-h","--help"]: + print """ +This utility just prints the length of the longest path +in the revision graph from revison 0 to the current one. +""" + exit(0) +plist = os.popen("hg parents --template='{rev}\n'").readlines() +if len(plist)>1: + print "You are in the process of merging" + exit(1) +PAR = int(plist[0]) + +f = os.popen("hg log -r 0:tip --template='{rev} {parents}\n'").readlines() +REV = -1 +lengths=[] +for l in f: + REV+=1 + s = l.split() + rev = int(s[0]) + if REV != rev: + print "Something is seriously wrong" + exit(1) + if len(s) == 1: + par1 = par2 = rev - 1 + elif len(s) == 2: + par1 = par2 = int(s[1].split(":")[0]) + else: + par1 = int(s[1].split(":")[0]) + par2 = int(s[2].split(":")[0]) + if rev == 0: + lengths.append(0) + else: + lengths.append(max(lengths[par1],lengths[par2])+1) +print lengths[PAR] diff --git a/test/error_test.cc b/test/error_test.cc --- a/test/error_test.cc +++ b/test/error_test.cc @@ -47,14 +47,9 @@ LEMON_ASSERT(false, "This is a fault message"); } -void fixme_disable() { - LEMON_FIXME("fixme_disable() is fixme!"); -} - void check_assertion_disable() { no_assertion_text_disable(); assertion_text_disable(); - fixme_disable(); } #undef LEMON_DISABLE_ASSERTS @@ -78,15 +73,10 @@ LEMON_ASSERT(false, "This is a fault message"); } -void fixme_custom() { - LEMON_FIXME("fixme_custom() is fixme!"); -} - void check_assertion_custom() { no_assertion_text_custom(); assertion_text_custom(); - fixme_custom(); - check(cnt == 2, "The custom assert handler does not work"); + check(cnt == 1, "The custom assert handler does not work"); } #undef LEMON_ASSERT_CUSTOM diff --git a/test/graph_test.h b/test/graph_test.h --- a/test/graph_test.h +++ b/test/graph_test.h @@ -212,10 +212,10 @@ } check(s == 0, "Wrong sum."); - map = constMap(12); - for (NodeIt it(G); it != INVALID; ++it) { - check(map[it] == 12, "Wrong operator[]."); - } + // map = constMap(12); + // for (NodeIt it(G); it != INVALID; ++it) { + // check(map[it] == 12, "Wrong operator[]."); + // } } template @@ -242,10 +242,10 @@ } check(s == 0, "Wrong sum."); - map = constMap(12); - for (ArcIt it(G); it != INVALID; ++it) { - check(map[it] == 12, "Wrong operator[]."); - } + // map = constMap(12); + // for (ArcIt it(G); it != INVALID; ++it) { + // check(map[it] == 12, "Wrong operator[]."); + // } } template @@ -272,10 +272,10 @@ } check(s == 0, "Wrong sum."); - map = constMap(12); - for (EdgeIt it(G); it != INVALID; ++it) { - check(map[it] == 12, "Wrong operator[]."); - } + // map = constMap(12); + // for (EdgeIt it(G); it != INVALID; ++it) { + // check(map[it] == 12, "Wrong operator[]."); + // } }