Merge #449 to branches >=1.2
authorAlpar Juttner <alpar@cs.elte.hu>
Thu, 13 Sep 2012 11:56:19 +0200
changeset 9987fdaa05a69a1
parent 995 4bb9e72e1a41
parent 997 761fe0846f49
child 999 00f8d9f9920d
child 1176 cd72eae05bdf
Merge #449 to branches >=1.2
CMakeLists.txt
lemon/adaptors.h
lemon/bfs.h
lemon/bits/edge_set_extender.h
lemon/bits/graph_extender.h
lemon/bits/solver_bits.h
lemon/cbc.cc
lemon/circulation.h
lemon/clp.cc
lemon/concepts/graph_components.h
lemon/concepts/heap.h
lemon/concepts/path.h
lemon/core.h
lemon/cplex.cc
lemon/dfs.h
lemon/glpk.cc
lemon/graph_to_eps.h
lemon/lp_base.h
lemon/path.h
test/CMakeLists.txt
test/adaptors_test.cc
test/connectivity_test.cc
test/digraph_test.cc
test/edge_set_test.cc
test/euler_test.cc
test/graph_test.cc
test/maps_test.cc
     1.1 --- a/CMakeLists.txt	Wed Sep 12 17:25:48 2012 +0200
     1.2 +++ b/CMakeLists.txt	Thu Sep 13 11:56:19 2012 +0200
     1.3 @@ -66,17 +66,17 @@
     1.4      #        (performance warning)
     1.5      # C4996: 'function': was declared deprecated
     1.6    ELSE()
     1.7 -    SET(CXX_WARNING "-Wall -W")
     1.8 +    SET(CXX_WARNING "-Wall")
     1.9    ENDIF()
    1.10  ENDIF()
    1.11  SET(LEMON_CXX_WARNING_FLAGS ${CXX_WARNING} CACHE STRING "LEMON warning flags.")
    1.12  
    1.13  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${LEMON_CXX_WARNING_FLAGS}")
    1.14  
    1.15 -SET( CMAKE_CXX_FLAGS_MAINTAINER "-Werror -ggdb" CACHE STRING
    1.16 +SET( CMAKE_CXX_FLAGS_MAINTAINER "-Werror -ggdb -O0" CACHE STRING
    1.17      "Flags used by the C++ compiler during maintainer builds."
    1.18      FORCE )
    1.19 -SET( CMAKE_C_FLAGS_MAINTAINER "-Werror" CACHE STRING
    1.20 +SET( CMAKE_C_FLAGS_MAINTAINER "-Werror -O0" CACHE STRING
    1.21      "Flags used by the C compiler during maintainer builds."
    1.22      FORCE )
    1.23  SET( CMAKE_EXE_LINKER_FLAGS_MAINTAINER
     2.1 --- a/cmake/FindCOIN.cmake	Wed Sep 12 17:25:48 2012 +0200
     2.2 +++ b/cmake/FindCOIN.cmake	Thu Sep 13 11:56:19 2012 +0200
     2.3 @@ -54,6 +54,17 @@
     2.4    HINTS ${COIN_ROOT_DIR}/lib
     2.5  )
     2.6  
     2.7 +FIND_LIBRARY(COIN_ZLIB_LIBRARY
     2.8 +  NAMES z libz
     2.9 +  HINTS ${COIN_ROOT_DIR}/lib/coin
    2.10 +  HINTS ${COIN_ROOT_DIR}/lib
    2.11 +)
    2.12 +FIND_LIBRARY(COIN_BZ2_LIBRARY
    2.13 +  NAMES bz2 libbz2
    2.14 +  HINTS ${COIN_ROOT_DIR}/lib/coin
    2.15 +  HINTS ${COIN_ROOT_DIR}/lib
    2.16 +)
    2.17 +
    2.18  INCLUDE(FindPackageHandleStandardArgs)
    2.19  FIND_PACKAGE_HANDLE_STANDARD_ARGS(COIN DEFAULT_MSG
    2.20    COIN_INCLUDE_DIR
    2.21 @@ -71,9 +82,15 @@
    2.22  
    2.23  IF(COIN_FOUND)
    2.24    SET(COIN_INCLUDE_DIRS ${COIN_INCLUDE_DIR})
    2.25 -  SET(COIN_LIBRARIES "${COIN_CBC_LIBRARY};${COIN_CBC_SOLVER_LIBRARY};${COIN_CGL_LIBRARY};${COIN_CLP_LIBRARY};${COIN_COIN_UTILS_LIBRARY};${COIN_OSI_LIBRARY};${COIN_OSI_CBC_LIBRARY};${COIN_OSI_CLP_LIBRARY}")
    2.26 -  SET(COIN_CLP_LIBRARIES "${COIN_CLP_LIBRARY};${COIN_COIN_UTILS_LIBRARY}")
    2.27 -  SET(COIN_CBC_LIBRARIES ${COIN_LIBRARIES})
    2.28 +  SET(COIN_CLP_LIBRARIES "${COIN_CLP_LIBRARY};${COIN_COIN_UTILS_LIBRARY};${COIN_ZLIB_LIBRARY};${COIN_BZ2_LIBRARY}")
    2.29 +  IF(COIN_ZLIB_LIBRARY)
    2.30 +    SET(COIN_CLP_LIBRARIES "${COIN_CLP_LIBRARIES};${COIN_ZLIB_LIBRARY}")
    2.31 +  ENDIF(COIN_ZLIB_LIBRARY)
    2.32 +   IF(COIN_BZ2_LIBRARY)
    2.33 +    SET(COIN_CLP_LIBRARIES "${COIN_CLP_LIBRARIES};${COIN_BZ2_LIBRARY}")
    2.34 +  ENDIF(COIN_BZ2_LIBRARY)
    2.35 +  SET(COIN_CBC_LIBRARIES "${COIN_CBC_LIBRARY};${COIN_CBC_SOLVER_LIBRARY};${COIN_CGL_LIBRARY};${COIN_OSI_LIBRARY};${COIN_OSI_CBC_LIBRARY};${COIN_OSI_CLP_LIBRARY};${COIN_ZLIB_LIBRARY};${COIN_BZ2_LIBRARY};${COIN_CLP_LIBRARIES}")
    2.36 +  SET(COIN_LIBRARIES ${COIN_CBC_LIBRARIES})
    2.37  ENDIF(COIN_FOUND)
    2.38  
    2.39  MARK_AS_ADVANCED(
    2.40 @@ -88,6 +105,8 @@
    2.41    COIN_OSI_CLP_LIBRARY
    2.42    COIN_OSI_VOL_LIBRARY
    2.43    COIN_VOL_LIBRARY
    2.44 +  COIN_ZLIB_LIBRARY
    2.45 +  COIN_BZ2_LIBRARY
    2.46  )
    2.47  
    2.48  IF(COIN_FOUND)
     3.1 --- a/cmake/FindCPLEX.cmake	Wed Sep 12 17:25:48 2012 +0200
     3.2 +++ b/cmake/FindCPLEX.cmake	Thu Sep 13 11:56:19 2012 +0200
     3.3 @@ -2,23 +2,25 @@
     3.4  
     3.5  FIND_PATH(CPLEX_INCLUDE_DIR
     3.6    ilcplex/cplex.h
     3.7 -  PATHS "C:/ILOG/CPLEX91/include"
     3.8 -  PATHS "/opt/ilog/cplex91/include"
     3.9 +  PATHS "C:/ILOG/CPLEX/include"
    3.10 +  PATHS "/opt/ilog/cplex/include"
    3.11    HINTS ${CPLEX_ROOT_DIR}/include
    3.12  )
    3.13  FIND_LIBRARY(CPLEX_LIBRARY
    3.14 -  cplex91
    3.15 -  PATHS "C:/ILOG/CPLEX91/lib/msvc7/stat_mda"
    3.16 -  PATHS "/opt/ilog/cplex91/bin"
    3.17 +  cplex
    3.18 +  PATHS "C:/ILOG/CPLEX/lib/msvc7/stat_mda"
    3.19 +  PATHS "/opt/ilog/cplex/bin"
    3.20    HINTS ${CPLEX_ROOT_DIR}/bin
    3.21 +  HINTS ${CPLEX_ROOT_DIR}/lib
    3.22  )
    3.23  
    3.24  INCLUDE(FindPackageHandleStandardArgs)
    3.25  FIND_PACKAGE_HANDLE_STANDARD_ARGS(CPLEX DEFAULT_MSG CPLEX_LIBRARY CPLEX_INCLUDE_DIR)
    3.26  
    3.27  FIND_PATH(CPLEX_BIN_DIR
    3.28 -  cplex91.dll
    3.29 -  PATHS "C:/ILOG/CPLEX91/bin/x86_win32"
    3.30 +  cplex.dll
    3.31 +  PATHS "C:/ILOG/CPLEX/bin/x86_win32"
    3.32 +  HINTS ${CPLEX_ROOT_DIR}/bin
    3.33  )
    3.34  
    3.35  IF(CPLEX_FOUND)
     4.1 --- a/lemon/adaptors.h	Wed Sep 12 17:25:48 2012 +0200
     4.2 +++ b/lemon/adaptors.h	Thu Sep 13 11:56:19 2012 +0200
     4.3 @@ -1371,7 +1371,7 @@
     4.4      /// Creates a subgraph for the given graph with the given node
     4.5      /// and edge filter maps.
     4.6      SubGraph(GR& graph, NF& node_filter, EF& edge_filter) {
     4.7 -      initialize(graph, node_filter, edge_filter);
     4.8 +      this->initialize(graph, node_filter, edge_filter);
     4.9      }
    4.10  
    4.11      /// \brief Sets the status of the given node
    4.12 @@ -2277,7 +2277,7 @@
    4.13      ///
    4.14      /// Creates an undirected graph from the given digraph.
    4.15      Undirector(DGR& digraph) {
    4.16 -      initialize(digraph);
    4.17 +      this->initialize(digraph);
    4.18      }
    4.19  
    4.20      /// \brief Arc map combined from two original arc maps
     5.1 --- a/lemon/bfs.h	Wed Sep 12 17:25:48 2012 +0200
     5.2 +++ b/lemon/bfs.h	Thu Sep 13 11:56:19 2012 +0200
     5.3 @@ -1251,6 +1251,7 @@
     5.4          visitor.examine(arc);
     5.5        }
     5.6        _Visitor& visitor;
     5.7 +      Constraints() {}
     5.8      };
     5.9    };
    5.10  #endif
     6.1 --- a/lemon/bits/bezier.h	Wed Sep 12 17:25:48 2012 +0200
     6.2 +++ b/lemon/bits/bezier.h	Thu Sep 13 11:56:19 2012 +0200
     6.3 @@ -159,7 +159,7 @@
     6.4      const Point c=(p3+p4)/2;
     6.5      const Point d=(a+b)/2;
     6.6      const Point e=(b+c)/2;
     6.7 -    const Point f=(d+e)/2;
     6.8 +    // const Point f=(d+e)/2;
     6.9      R f1=_f(Bezier3(p1,a,d,e),_d);
    6.10      R f2=_f(Bezier3(e,d,c,p4),_d);
    6.11      return _s(f1,f2);
     7.1 --- a/lemon/bits/edge_set_extender.h	Wed Sep 12 17:25:48 2012 +0200
     7.2 +++ b/lemon/bits/edge_set_extender.h	Thu Sep 13 11:56:19 2012 +0200
     7.3 @@ -523,13 +523,13 @@
     7.4      //
     7.5      // Returns the base node of the iterator
     7.6      Node baseNode(const IncEdgeIt &e) const {
     7.7 -      return e.direction ? u(e) : v(e);
     7.8 +      return e.direction ? this->u(e) : this->v(e);
     7.9      }
    7.10      // Running node of the iterator
    7.11      //
    7.12      // Returns the running node of the iterator
    7.13      Node runningNode(const IncEdgeIt &e) const {
    7.14 -      return e.direction ? v(e) : u(e);
    7.15 +      return e.direction ? this->v(e) : this->u(e);
    7.16      }
    7.17  
    7.18  
     8.1 --- a/lemon/bits/graph_extender.h	Wed Sep 12 17:25:48 2012 +0200
     8.2 +++ b/lemon/bits/graph_extender.h	Thu Sep 13 11:56:19 2012 +0200
     8.3 @@ -587,13 +587,13 @@
     8.4      //
     8.5      // Returns the base node of the iterator
     8.6      Node baseNode(const IncEdgeIt &edge) const {
     8.7 -      return edge._direction ? u(edge) : v(edge);
     8.8 +      return edge._direction ? this->u(edge) : this->v(edge);
     8.9      }
    8.10      // Running node of the iterator
    8.11      //
    8.12      // Returns the running node of the iterator
    8.13      Node runningNode(const IncEdgeIt &edge) const {
    8.14 -      return edge._direction ? v(edge) : u(edge);
    8.15 +      return edge._direction ? this->v(edge) : this->u(edge);
    8.16      }
    8.17  
    8.18      // Mappable extension
     9.1 --- a/lemon/bits/solver_bits.h	Wed Sep 12 17:25:48 2012 +0200
     9.2 +++ b/lemon/bits/solver_bits.h	Thu Sep 13 11:56:19 2012 +0200
     9.3 @@ -44,6 +44,7 @@
     9.4  
     9.5        void clear() {
     9.6          first_item = -1;
     9.7 +        last_item = -1;
     9.8          first_free_item = -1;
     9.9          items.clear();
    9.10          cross.clear();
    10.1 --- a/lemon/cbc.cc	Wed Sep 12 17:25:48 2012 +0200
    10.2 +++ b/lemon/cbc.cc	Thu Sep 13 11:56:19 2012 +0200
    10.3 @@ -25,12 +25,7 @@
    10.4  #include <coin/CbcModel.hpp>
    10.5  #include <coin/OsiSolverInterface.hpp>
    10.6  
    10.7 -#ifdef COIN_HAS_CLP
    10.8  #include "coin/OsiClpSolverInterface.hpp"
    10.9 -#endif
   10.10 -#ifdef COIN_HAS_OSL
   10.11 -#include "coin/OsiOslSolverInterface.hpp"
   10.12 -#endif
   10.13  
   10.14  #include "coin/CbcCutGenerator.hpp"
   10.15  #include "coin/CbcHeuristicLocal.hpp"
   10.16 @@ -270,13 +265,7 @@
   10.17      if (_osi_solver) {
   10.18        delete _osi_solver;
   10.19      }
   10.20 -#ifdef COIN_HAS_CLP
   10.21      _osi_solver = new OsiClpSolverInterface();
   10.22 -#elif COIN_HAS_OSL
   10.23 -    _osi_solver = new OsiOslSolverInterface();
   10.24 -#else
   10.25 -#error Cannot instantiate Osi solver
   10.26 -#endif
   10.27  
   10.28      _osi_solver->loadFromCoinModel(*_prob);
   10.29  
   10.30 @@ -328,13 +317,11 @@
   10.31        CglFlowCover flowGen;
   10.32        _cbc_model->addCutGenerator(&flowGen, -1, "FlowCover");
   10.33  
   10.34 -#ifdef COIN_HAS_CLP
   10.35        OsiClpSolverInterface* osiclp =
   10.36          dynamic_cast<OsiClpSolverInterface*>(_cbc_model->solver());
   10.37        if (osiclp->getNumRows() < 300 && osiclp->getNumCols() < 500) {
   10.38          osiclp->setupForRepeatedUse(2, 0);
   10.39        }
   10.40 -#endif
   10.41  
   10.42        CbcRounding heuristic1(*_cbc_model);
   10.43        heuristic1.setWhen(3);
   10.44 @@ -448,8 +435,6 @@
   10.45      }
   10.46  
   10.47      _prob = new CoinModel();
   10.48 -    rows.clear();
   10.49 -    cols.clear();
   10.50    }
   10.51  
   10.52    void CbcMip::_messageLevel(MessageLevel level) {
    11.1 --- a/lemon/circulation.h	Wed Sep 12 17:25:48 2012 +0200
    11.2 +++ b/lemon/circulation.h	Thu Sep 13 11:56:19 2012 +0200
    11.3 @@ -572,8 +572,6 @@
    11.4      {
    11.5  
    11.6        Node act;
    11.7 -      Node bact=INVALID;
    11.8 -      Node last_activated=INVALID;
    11.9        while((act=_level->highestActive())!=INVALID) {
   11.10          int actlevel=(*_level)[act];
   11.11          int mlevel=_node_num;
    12.1 --- a/lemon/clp.cc	Wed Sep 12 17:25:48 2012 +0200
    12.2 +++ b/lemon/clp.cc	Thu Sep 13 11:56:19 2012 +0200
    12.3 @@ -437,8 +437,6 @@
    12.4    void ClpLp::_clear() {
    12.5      delete _prob;
    12.6      _prob = new ClpSimplex();
    12.7 -    rows.clear();
    12.8 -    cols.clear();
    12.9      _col_names_ref.clear();
   12.10      _clear_temporals();
   12.11    }
    13.1 --- a/lemon/concept_check.h	Wed Sep 12 17:25:48 2012 +0200
    13.2 +++ b/lemon/concept_check.h	Thu Sep 13 11:56:19 2012 +0200
    13.3 @@ -35,6 +35,22 @@
    13.4    */
    13.5  
    13.6    template <class T> inline void ignore_unused_variable_warning(const T&) { }
    13.7 +  template <class T1, class T2>
    13.8 +  inline void ignore_unused_variable_warning(const T1&, const T2&) { }
    13.9 +  template <class T1, class T2, class T3>
   13.10 +  inline void ignore_unused_variable_warning(const T1&, const T2&,
   13.11 +                                             const T3&) { }
   13.12 +  template <class T1, class T2, class T3, class T4>
   13.13 +  inline void ignore_unused_variable_warning(const T1&, const T2&,
   13.14 +                                             const T3&, const T4&) { }
   13.15 +  template <class T1, class T2, class T3, class T4, class T5>
   13.16 +  inline void ignore_unused_variable_warning(const T1&, const T2&,
   13.17 +                                             const T3&, const T4&,
   13.18 +                                             const T5&) { }
   13.19 +  template <class T1, class T2, class T3, class T4, class T5, class T6>
   13.20 +  inline void ignore_unused_variable_warning(const T1&, const T2&,
   13.21 +                                             const T3&, const T4&,
   13.22 +                                             const T5&, const T6&) { }
   13.23  
   13.24    ///\e
   13.25    template <class Concept>
    14.1 --- a/lemon/concepts/graph_components.h	Wed Sep 12 17:25:48 2012 +0200
    14.2 +++ b/lemon/concepts/graph_components.h	Thu Sep 13 11:56:19 2012 +0200
    14.3 @@ -115,6 +115,7 @@
    14.4  
    14.5          const _GraphItem &ia;
    14.6          const _GraphItem &ib;
    14.7 +        Constraints() {}
    14.8        };
    14.9      };
   14.10  
   14.11 @@ -174,6 +175,7 @@
   14.12          }
   14.13  
   14.14          const _Digraph& digraph;
   14.15 +        Constraints() {}
   14.16        };
   14.17      };
   14.18  
   14.19 @@ -290,6 +292,7 @@
   14.20          }
   14.21  
   14.22          const _Graph& graph;
   14.23 +      Constraints() {}
   14.24        };
   14.25  
   14.26      };
   14.27 @@ -369,6 +372,7 @@
   14.28          }
   14.29  
   14.30          const _Digraph& digraph;
   14.31 +        Constraints() {}
   14.32        };
   14.33      };
   14.34  
   14.35 @@ -421,6 +425,7 @@
   14.36          }
   14.37  
   14.38          const _Graph& graph;
   14.39 +        Constraints() {}
   14.40        };
   14.41      };
   14.42  
   14.43 @@ -489,6 +494,8 @@
   14.44            _GraphItemIt it2;
   14.45            _GraphItemIt it3 = it1;
   14.46            _GraphItemIt it4 = INVALID;
   14.47 +          ignore_unused_variable_warning(it3);
   14.48 +          ignore_unused_variable_warning(it4);
   14.49  
   14.50            it2 = ++it1;
   14.51            ++it2 = it1;
   14.52 @@ -498,6 +505,7 @@
   14.53            bi = it2;
   14.54          }
   14.55          const GR& g;
   14.56 +        Constraints() {}
   14.57        };
   14.58      };
   14.59  
   14.60 @@ -577,6 +585,8 @@
   14.61            _GraphIncIt it2;
   14.62            _GraphIncIt it3 = it1;
   14.63            _GraphIncIt it4 = INVALID;
   14.64 +          ignore_unused_variable_warning(it3);
   14.65 +          ignore_unused_variable_warning(it4);
   14.66  
   14.67            it2 = ++it1;
   14.68            ++it2 = it1;
   14.69 @@ -586,6 +596,7 @@
   14.70          }
   14.71          const Base& node;
   14.72          const GR& graph;
   14.73 +        Constraints() {}
   14.74        };
   14.75      };
   14.76  
   14.77 @@ -762,6 +773,7 @@
   14.78          }
   14.79  
   14.80          const _Digraph& digraph;
   14.81 +        Constraints() {}
   14.82        };
   14.83      };
   14.84  
   14.85 @@ -886,6 +898,7 @@
   14.86          }
   14.87  
   14.88          const _Graph& graph;
   14.89 +        Constraints() {}
   14.90        };
   14.91      };
   14.92  
   14.93 @@ -943,6 +956,7 @@
   14.94          }
   14.95  
   14.96          const _Digraph& digraph;
   14.97 +        Constraints() {}
   14.98        };
   14.99      };
  14.100  
  14.101 @@ -984,6 +998,7 @@
  14.102          }
  14.103  
  14.104          const _Graph& graph;
  14.105 +        Constraints() {}
  14.106        };
  14.107      };
  14.108  
  14.109 @@ -1061,6 +1076,7 @@
  14.110          const _Map &m;
  14.111          const GR &g;
  14.112          const typename GraphMap::Value &t;
  14.113 +        Constraints() {}
  14.114        };
  14.115  
  14.116      };
  14.117 @@ -1199,6 +1215,7 @@
  14.118          }
  14.119  
  14.120          const _Digraph& digraph;
  14.121 +        Constraints() {}
  14.122        };
  14.123      };
  14.124  
  14.125 @@ -1284,6 +1301,7 @@
  14.126          }
  14.127  
  14.128          const _Graph& graph;
  14.129 +        Constraints() {}
  14.130        };
  14.131      };
  14.132  
  14.133 @@ -1328,6 +1346,7 @@
  14.134          }
  14.135  
  14.136          _Digraph& digraph;
  14.137 +        Constraints() {}
  14.138        };
  14.139      };
  14.140  
  14.141 @@ -1372,6 +1391,7 @@
  14.142          }
  14.143  
  14.144          _Graph& graph;
  14.145 +        Constraints() {}
  14.146        };
  14.147      };
  14.148  
  14.149 @@ -1411,6 +1431,7 @@
  14.150          }
  14.151  
  14.152          _Digraph& digraph;
  14.153 +        Constraints() {}
  14.154        };
  14.155      };
  14.156  
  14.157 @@ -1450,6 +1471,7 @@
  14.158          }
  14.159  
  14.160          _Graph& graph;
  14.161 +        Constraints() {}
  14.162        };
  14.163      };
  14.164  
  14.165 @@ -1478,6 +1500,7 @@
  14.166          }
  14.167  
  14.168          _Digraph& digraph;
  14.169 +        Constraints() {}
  14.170        };
  14.171      };
  14.172  
  14.173 @@ -1506,6 +1529,7 @@
  14.174          }
  14.175  
  14.176          _Graph& graph;
  14.177 +        Constraints() {}
  14.178        };
  14.179      };
  14.180  
    15.1 --- a/lemon/concepts/heap.h	Wed Sep 12 17:25:48 2012 +0200
    15.2 +++ b/lemon/concepts/heap.h	Thu Sep 13 11:56:19 2012 +0200
    15.3 @@ -314,6 +314,7 @@
    15.4  
    15.5          _Heap& heap;
    15.6          ItemIntMap& map;
    15.7 +        Constraints() {}
    15.8        };
    15.9      };
   15.10  
    16.1 --- a/lemon/concepts/maps.h	Wed Sep 12 17:25:48 2012 +0200
    16.2 +++ b/lemon/concepts/maps.h	Thu Sep 13 11:56:19 2012 +0200
    16.3 @@ -49,7 +49,7 @@
    16.4  
    16.5        /// Returns the value associated with the given key.
    16.6        Value operator[](const Key &) const {
    16.7 -        return *static_cast<Value *>(0);
    16.8 +        return *(static_cast<Value *>(0)+1);
    16.9        }
   16.10  
   16.11        template<typename _ReadMap>
   16.12 @@ -68,6 +68,7 @@
   16.13          const Key& key;
   16.14          const typename _ReadMap::Key& own_key;
   16.15          const _ReadMap& m;
   16.16 +        Constraints() {}
   16.17        };
   16.18  
   16.19      };
   16.20 @@ -109,6 +110,7 @@
   16.21          const typename _WriteMap::Key& own_key;
   16.22          const typename _WriteMap::Value& own_val;
   16.23          _WriteMap& m;
   16.24 +        Constraints() {}
   16.25        };
   16.26      };
   16.27  
   16.28 @@ -129,7 +131,8 @@
   16.29  
   16.30        /// Returns the value associated with the given key.
   16.31        Value operator[](const Key &) const {
   16.32 -        return *static_cast<Value *>(0);
   16.33 +        Value *r = 0;
   16.34 +        return *r;
   16.35        }
   16.36  
   16.37        /// Sets the value associated with the given key.
   16.38 @@ -169,12 +172,14 @@
   16.39  
   16.40        /// Returns a reference to the value associated with the given key.
   16.41        Reference operator[](const Key &) {
   16.42 -        return *static_cast<Value *>(0);
   16.43 +        Value *r = 0;
   16.44 +        return *r;
   16.45        }
   16.46  
   16.47        /// Returns a const reference to the value associated with the given key.
   16.48        ConstReference operator[](const Key &) const {
   16.49 -        return *static_cast<Value *>(0);
   16.50 +        Value *r = 0;
   16.51 +        return *r;
   16.52        }
   16.53  
   16.54        /// Sets the value associated with the given key.
   16.55 @@ -205,6 +210,7 @@
   16.56          typename _ReferenceMap::Reference own_ref;
   16.57          typename _ReferenceMap::ConstReference own_cref;
   16.58          _ReferenceMap& m;
   16.59 +        Constraints() {}
   16.60        };
   16.61      };
   16.62  
    17.1 --- a/lemon/concepts/path.h	Wed Sep 12 17:25:48 2012 +0200
    17.2 +++ b/lemon/concepts/path.h	Thu Sep 13 11:56:19 2012 +0200
    17.3 @@ -168,6 +168,7 @@
    17.4            ignore_unused_variable_warning(ed);
    17.5          }
    17.6          _Path& p;
    17.7 +        PathDumperConstraints() {}
    17.8        };
    17.9  
   17.10        template <typename _Digraph, typename _Path>
   17.11 @@ -193,6 +194,7 @@
   17.12            ignore_unused_variable_warning(ed);
   17.13          }
   17.14          _Path& p;
   17.15 +        PathDumperConstraints() {}
   17.16        };
   17.17  
   17.18      }
    18.1 --- a/lemon/core.h	Wed Sep 12 17:25:48 2012 +0200
    18.2 +++ b/lemon/core.h	Thu Sep 13 11:56:19 2012 +0200
    18.3 @@ -1849,15 +1849,26 @@
    18.4      ///this operator. If you change the outgoing arcs of
    18.5      ///a single node \c n, then \ref refresh(Node) "refresh(n)" is enough.
    18.6      ///
    18.7 -#ifdef DOXYGEN
    18.8 -    Arc operator()(Node s, Node t, Arc prev=INVALID) const {}
    18.9 -#else
   18.10 -    using ArcLookUp<GR>::operator() ;
   18.11 -    Arc operator()(Node s, Node t, Arc prev) const
   18.12 +    Arc operator()(Node s, Node t, Arc prev=INVALID) const
   18.13      {
   18.14 -      return prev==INVALID?(*this)(s,t):_next[prev];
   18.15 +      if(prev==INVALID)
   18.16 +        {
   18.17 +          Arc f=INVALID;
   18.18 +          Arc e;
   18.19 +          for(e=_head[s];
   18.20 +              e!=INVALID&&_g.target(e)!=t;
   18.21 +              e = t < _g.target(e)?_left[e]:_right[e]) ;
   18.22 +          while(e!=INVALID)
   18.23 +            if(_g.target(e)==t)
   18.24 +              {
   18.25 +                f = e;
   18.26 +                e = _left[e];
   18.27 +              }
   18.28 +            else e = _right[e];
   18.29 +          return f;
   18.30 +        }
   18.31 +      else return _next[prev];
   18.32      }
   18.33 -#endif
   18.34  
   18.35    };
   18.36  
    19.1 --- a/lemon/cplex.cc	Wed Sep 12 17:25:48 2012 +0200
    19.2 +++ b/lemon/cplex.cc	Thu Sep 13 11:56:19 2012 +0200
    19.3 @@ -470,8 +470,6 @@
    19.4      CPXfreeprob(cplexEnv(),&_prob);
    19.5      int status;
    19.6      _prob = CPXcreateprob(cplexEnv(), &status, "Cplex problem");
    19.7 -    rows.clear();
    19.8 -    cols.clear();
    19.9    }
   19.10  
   19.11    void CplexBase::_messageLevel(MessageLevel level) {
    20.1 --- a/lemon/dfs.h	Wed Sep 12 17:25:48 2012 +0200
    20.2 +++ b/lemon/dfs.h	Thu Sep 13 11:56:19 2012 +0200
    20.3 @@ -1193,6 +1193,7 @@
    20.4          visitor.backtrack(arc);
    20.5        }
    20.6        _Visitor& visitor;
    20.7 +      Constraints() {}
    20.8      };
    20.9    };
   20.10  #endif
    21.1 --- a/lemon/glpk.cc	Wed Sep 12 17:25:48 2012 +0200
    21.2 +++ b/lemon/glpk.cc	Thu Sep 13 11:56:19 2012 +0200
    21.3 @@ -556,8 +556,6 @@
    21.4  
    21.5    void GlpkBase::_clear() {
    21.6      glp_erase_prob(lp);
    21.7 -    rows.clear();
    21.8 -    cols.clear();
    21.9    }
   21.10  
   21.11    void GlpkBase::freeEnv() {
    22.1 --- a/lemon/graph_to_eps.h	Wed Sep 12 17:25:48 2012 +0200
    22.2 +++ b/lemon/graph_to_eps.h	Thu Sep 13 11:56:19 2012 +0200
    22.3 @@ -222,7 +222,7 @@
    22.4    using T::_title;
    22.5    using T::_copyright;
    22.6  
    22.7 -  using T::NodeTextColorType;
    22.8 +  using typename T::NodeTextColorType;
    22.9    using T::CUST_COL;
   22.10    using T::DIST_COL;
   22.11    using T::DIST_BW;
    23.1 --- a/lemon/lp_base.h	Wed Sep 12 17:25:48 2012 +0200
    23.2 +++ b/lemon/lp_base.h	Thu Sep 13 11:56:19 2012 +0200
    23.3 @@ -1556,7 +1556,7 @@
    23.4      void min() { _setSense(MIN); }
    23.5  
    23.6      ///Clears the problem
    23.7 -    void clear() { _clear(); }
    23.8 +    void clear() { _clear(); rows.clear(); cols.clear(); }
    23.9  
   23.10      /// Sets the message level of the solver
   23.11      void messageLevel(MessageLevel level) { _messageLevel(level); }
    24.1 --- a/lemon/path.h	Wed Sep 12 17:25:48 2012 +0200
    24.2 +++ b/lemon/path.h	Thu Sep 13 11:56:19 2012 +0200
    24.3 @@ -64,6 +64,12 @@
    24.4      /// Default constructor
    24.5      Path() {}
    24.6  
    24.7 +    /// \brief Copy constructor
    24.8 +    ///
    24.9 +    Path(const Path& cpath) {
   24.10 +      pathCopy(cpath, *this);
   24.11 +    }
   24.12 +
   24.13      /// \brief Template copy constructor
   24.14      ///
   24.15      /// This constuctor initializes the path from any other path type.
   24.16 @@ -73,6 +79,13 @@
   24.17        pathCopy(cpath, *this);
   24.18      }
   24.19  
   24.20 +    /// \brief Copy assignment
   24.21 +    ///
   24.22 +    Path& operator=(const Path& cpath) {
   24.23 +      pathCopy(cpath, *this);
   24.24 +      return *this;
   24.25 +    }
   24.26 +
   24.27      /// \brief Template copy assignment
   24.28      ///
   24.29      /// This operator makes a copy of a path of any other type.
   24.30 @@ -252,6 +265,12 @@
   24.31      /// Default constructor
   24.32      SimplePath() {}
   24.33  
   24.34 +    /// \brief Copy constructor
   24.35 +    ///
   24.36 +    SimplePath(const SimplePath& cpath) {
   24.37 +      pathCopy(cpath, *this);
   24.38 +    }
   24.39 +
   24.40      /// \brief Template copy constructor
   24.41      ///
   24.42      /// This path can be initialized with any other path type. It just
   24.43 @@ -261,6 +280,13 @@
   24.44        pathCopy(cpath, *this);
   24.45      }
   24.46  
   24.47 +    /// \brief Copy assignment
   24.48 +    ///
   24.49 +    SimplePath& operator=(const SimplePath& cpath) {
   24.50 +      pathCopy(cpath, *this);
   24.51 +      return *this;
   24.52 +    }
   24.53 +
   24.54      /// \brief Template copy assignment
   24.55      ///
   24.56      /// This path can be initialized with any other path type. It just
   24.57 @@ -431,6 +457,12 @@
   24.58      /// Default constructor
   24.59      ListPath() : first(0), last(0) {}
   24.60  
   24.61 +    /// \brief Copy constructor
   24.62 +    ///
   24.63 +    ListPath(const ListPath& cpath) : first(0), last(0) {
   24.64 +      pathCopy(cpath, *this);
   24.65 +    }
   24.66 +
   24.67      /// \brief Template copy constructor
   24.68      ///
   24.69      /// This path can be initialized with any other path type. It just
   24.70 @@ -447,6 +479,13 @@
   24.71        clear();
   24.72      }
   24.73  
   24.74 +    /// \brief Copy assignment
   24.75 +    ///
   24.76 +    ListPath& operator=(const ListPath& cpath) {
   24.77 +      pathCopy(cpath, *this);
   24.78 +      return *this;
   24.79 +    }
   24.80 +
   24.81      /// \brief Template copy assignment
   24.82      ///
   24.83      /// This path can be initialized with any other path type. It just
   24.84 @@ -758,6 +797,12 @@
   24.85      /// Default constructor
   24.86      StaticPath() : len(0), arcs(0) {}
   24.87  
   24.88 +    /// \brief Copy constructor
   24.89 +    ///
   24.90 +    StaticPath(const StaticPath& cpath) : arcs(0) {
   24.91 +      pathCopy(cpath, *this);
   24.92 +    }
   24.93 +
   24.94      /// \brief Template copy constructor
   24.95      ///
   24.96      /// This path can be initialized from any other path type.
   24.97 @@ -773,6 +818,13 @@
   24.98        if (arcs) delete[] arcs;
   24.99      }
  24.100  
  24.101 +    /// \brief Copy assignment
  24.102 +    ///
  24.103 +    StaticPath& operator=(const StaticPath& cpath) {
  24.104 +      pathCopy(cpath, *this);
  24.105 +      return *this;
  24.106 +    }
  24.107 +
  24.108      /// \brief Template copy assignment
  24.109      ///
  24.110      /// This path can be made equal to any other path type. It simply
    25.1 --- a/test/CMakeLists.txt	Wed Sep 12 17:25:48 2012 +0200
    25.2 +++ b/test/CMakeLists.txt	Thu Sep 13 11:56:19 2012 +0200
    25.3 @@ -13,6 +13,7 @@
    25.4  
    25.5  SET(TESTS
    25.6    adaptors_test
    25.7 +  arc_look_up_test
    25.8    bellman_ford_test
    25.9    bfs_test
   25.10    circulation_test
   25.11 @@ -86,7 +87,7 @@
   25.12      GET_TARGET_PROPERTY(TARGET_LOC lp_test LOCATION)
   25.13      GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
   25.14      ADD_CUSTOM_COMMAND(TARGET lp_test POST_BUILD
   25.15 -      COMMAND ${CMAKE_COMMAND} -E copy ${CPLEX_BIN_DIR}/cplex91.dll ${TARGET_PATH}
   25.16 +      COMMAND ${CMAKE_COMMAND} -E copy ${CPLEX_BIN_DIR}/cplex.dll ${TARGET_PATH}
   25.17      )
   25.18    ENDIF()
   25.19  ENDIF()
   25.20 @@ -128,7 +129,7 @@
   25.21      GET_TARGET_PROPERTY(TARGET_LOC mip_test LOCATION)
   25.22      GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
   25.23      ADD_CUSTOM_COMMAND(TARGET mip_test POST_BUILD
   25.24 -      COMMAND ${CMAKE_COMMAND} -E copy ${CPLEX_BIN_DIR}/cplex91.dll ${TARGET_PATH}
   25.25 +      COMMAND ${CMAKE_COMMAND} -E copy ${CPLEX_BIN_DIR}/cplex.dll ${TARGET_PATH}
   25.26      )
   25.27    ENDIF()
   25.28  ENDIF()
    26.1 --- a/test/adaptors_test.cc	Wed Sep 12 17:25:48 2012 +0200
    26.2 +++ b/test/adaptors_test.cc	Thu Sep 13 11:56:19 2012 +0200
    26.3 @@ -65,6 +65,7 @@
    26.4    Digraph::Arc a1 = digraph.addArc(n1, n2);
    26.5    Digraph::Arc a2 = digraph.addArc(n1, n3);
    26.6    Digraph::Arc a3 = digraph.addArc(n2, n3);
    26.7 +  ignore_unused_variable_warning(a3);
    26.8  
    26.9    // Check the adaptor
   26.10    checkGraphNodeList(adaptor, 3);
   26.11 @@ -99,6 +100,7 @@
   26.12    Adaptor::Arc a6 = adaptor.addArc(n2, n4);
   26.13    Adaptor::Arc a7 = adaptor.addArc(n1, n4);
   26.14    Adaptor::Arc a8 = adaptor.addArc(n1, n2);
   26.15 +  ignore_unused_variable_warning(a6,a7,a8);
   26.16  
   26.17    adaptor.erase(a1);
   26.18    adaptor.erase(n3);
   26.19 @@ -758,6 +760,7 @@
   26.20    Digraph::Arc a1 = digraph.addArc(n1, n2);
   26.21    Digraph::Arc a2 = digraph.addArc(n1, n3);
   26.22    Digraph::Arc a3 = digraph.addArc(n2, n3);
   26.23 +  ignore_unused_variable_warning(a1,a2,a3);
   26.24  
   26.25    checkGraphNodeList(adaptor, 6);
   26.26    checkGraphArcList(adaptor, 6);
    27.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    27.2 +++ b/test/arc_look_up_test.cc	Thu Sep 13 11:56:19 2012 +0200
    27.3 @@ -0,0 +1,85 @@
    27.4 +/* -*- mode: C++; indent-tabs-mode: nil; -*-
    27.5 + *
    27.6 + * This file is a part of LEMON, a generic C++ optimization library.
    27.7 + *
    27.8 + * Copyright (C) 2003-2009
    27.9 + * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
   27.10 + * (Egervary Research Group on Combinatorial Optimization, EGRES).
   27.11 + *
   27.12 + * Permission to use, modify and distribute this software is granted
   27.13 + * provided that this copyright notice appears in all copies. For
   27.14 + * precise terms see the accompanying LICENSE file.
   27.15 + *
   27.16 + * This software is provided "AS IS" with no warranty of any kind,
   27.17 + * express or implied, and with no claim as to its suitability for any
   27.18 + * purpose.
   27.19 + *
   27.20 + */
   27.21 +
   27.22 +#include <iostream>
   27.23 +#include "lemon/list_graph.h"
   27.24 +#include "lemon/lgf_reader.h"
   27.25 +
   27.26 +#include "test_tools.h"
   27.27 +
   27.28 +using namespace lemon;
   27.29 +
   27.30 +const int lgfn = 4;
   27.31 +const std::string lgf =
   27.32 +  "@nodes\n"
   27.33 +"label\n"
   27.34 +"0\n"
   27.35 +"1\n"
   27.36 +"2\n"
   27.37 +"3\n"
   27.38 +"4\n"
   27.39 +"5\n"
   27.40 +"6\n"
   27.41 +"@arcs\n"
   27.42 +"label\n"
   27.43 +"5 6 0\n"
   27.44 +"5 4 1\n"
   27.45 +"4 6 2\n"
   27.46 +"3 4 3\n"
   27.47 +"3 4 4\n"
   27.48 +"3 2 5\n"
   27.49 +"3 5 6\n"
   27.50 +"3 5 7\n"
   27.51 +"3 5 8\n"
   27.52 +"3 5 9\n"
   27.53 +"2 4 10\n"
   27.54 +"2 4 11\n"
   27.55 +"2 4 12\n"
   27.56 +"2 4 13\n"
   27.57 +"1 2 14\n"
   27.58 +"1 2 15\n"
   27.59 +"1 0 16\n"
   27.60 +"1 3 17\n"
   27.61 +"1 3 18\n"
   27.62 +"1 3 19\n"
   27.63 +"1 3 20\n"
   27.64 +"0 2 21\n"
   27.65 +"0 2 22\n"
   27.66 +"0 2 23\n"
   27.67 +"0 2 24\n";
   27.68 +
   27.69 +
   27.70 +int main() {
   27.71 +  ListDigraph graph;
   27.72 +  std::istringstream lgfs(lgf);
   27.73 +  DigraphReader<ListDigraph>(graph, lgfs).run();
   27.74 +  
   27.75 +  AllArcLookUp<ListDigraph> lookup(graph);
   27.76 +	
   27.77 +  int numArcs = countArcs(graph);
   27.78 +	
   27.79 +  int arcCnt = 0;
   27.80 +  for(ListDigraph::NodeIt n1(graph); n1 != INVALID; ++n1)
   27.81 +    for(ListDigraph::NodeIt n2(graph); n2 != INVALID; ++n2)
   27.82 +      for(ListDigraph::Arc a = lookup(n1, n2); a != INVALID;
   27.83 +	  a = lookup(n1, n2, a))
   27.84 +	++arcCnt;
   27.85 +  check(arcCnt==numArcs, "Wrong total number of arcs");
   27.86 +
   27.87 +  return 0;
   27.88 +}
    28.1 --- a/test/connectivity_test.cc	Wed Sep 12 17:25:48 2012 +0200
    28.2 +++ b/test/connectivity_test.cc	Thu Sep 13 11:56:19 2012 +0200
    28.3 @@ -68,6 +68,7 @@
    28.4      Digraph::NodeMap<int> order(d);
    28.5      Graph g(d);
    28.6      Digraph::Node n = d.addNode();
    28.7 +    ignore_unused_variable_warning(n);
    28.8  
    28.9      check(stronglyConnected(d), "This digraph is strongly connected");
   28.10      check(countStronglyConnectedComponents(d) == 1,
   28.11 @@ -245,6 +246,7 @@
   28.12      Digraph::Node shoe = d.addNode();
   28.13      Digraph::Node watch = d.addNode();
   28.14      Digraph::Node pants = d.addNode();
   28.15 +    ignore_unused_variable_warning(watch);
   28.16  
   28.17      d.addArc(socks, shoe);
   28.18      d.addArc(pants, shoe);
    29.1 --- a/test/digraph_test.cc	Wed Sep 12 17:25:48 2012 +0200
    29.2 +++ b/test/digraph_test.cc	Thu Sep 13 11:56:19 2012 +0200
    29.3 @@ -64,6 +64,7 @@
    29.4    Arc a2 = G.addArc(n2, n1),
    29.5        a3 = G.addArc(n2, n3),
    29.6        a4 = G.addArc(n2, n3);
    29.7 +  ignore_unused_variable_warning(a2,a3,a4);
    29.8  
    29.9    checkGraphNodeList(G, 3);
   29.10    checkGraphArcList(G, 4);
   29.11 @@ -92,6 +93,7 @@
   29.12    Node n1 = G.addNode(), n2 = G.addNode(), n3 = G.addNode();
   29.13    Arc a1 = G.addArc(n1, n2), a2 = G.addArc(n2, n1),
   29.14        a3 = G.addArc(n2, n3), a4 = G.addArc(n2, n3);
   29.15 +  ignore_unused_variable_warning(a1,a2,a3,a4);
   29.16  
   29.17    Node n4 = G.split(n2);
   29.18  
   29.19 @@ -125,6 +127,7 @@
   29.20    Arc a1 = G.addArc(n1, n2), a2 = G.addArc(n4, n1),
   29.21        a3 = G.addArc(n4, n3), a4 = G.addArc(n4, n3),
   29.22        a5 = G.addArc(n2, n4);
   29.23 +  ignore_unused_variable_warning(a1,a2,a3,a5);
   29.24  
   29.25    checkGraphNodeList(G, 4);
   29.26    checkGraphArcList(G, 5);
   29.27 @@ -204,6 +207,7 @@
   29.28    Arc a1 = G.addArc(n1, n2), a2 = G.addArc(n4, n1),
   29.29        a3 = G.addArc(n4, n3), a4 = G.addArc(n3, n1),
   29.30        a5 = G.addArc(n2, n4);
   29.31 +  ignore_unused_variable_warning(a2,a3,a4,a5);
   29.32  
   29.33    // Check arc deletion
   29.34    G.erase(a1);
   29.35 @@ -251,6 +255,7 @@
   29.36    Node n1 = G.addNode(), n2 = G.addNode(), n3 = G.addNode();
   29.37    Arc a1 = G.addArc(n1, n2), a2 = G.addArc(n2, n1),
   29.38        a3 = G.addArc(n2, n3), a4 = G.addArc(n2, n3);
   29.39 +  ignore_unused_variable_warning(a1,a2,a3,a4);
   29.40  
   29.41    typename Digraph::Snapshot snapshot(G);
   29.42  
   29.43 @@ -351,6 +356,7 @@
   29.44    Arc
   29.45      e1 = g.addArc(n1, n2),
   29.46      e2 = g.addArc(n2, n3);
   29.47 +  ignore_unused_variable_warning(e2);
   29.48  
   29.49    check(g.valid(n1), "Wrong validity check");
   29.50    check(g.valid(e1), "Wrong validity check");
    30.1 --- a/test/edge_set_test.cc	Wed Sep 12 17:25:48 2012 +0200
    30.2 +++ b/test/edge_set_test.cc	Thu Sep 13 11:56:19 2012 +0200
    30.3 @@ -44,10 +44,12 @@
    30.4      n2 = digraph.addNode();
    30.5  
    30.6    Digraph::Arc ga1 = digraph.addArc(n1, n2);
    30.7 +  ignore_unused_variable_warning(ga1);
    30.8  
    30.9    ArcSet arc_set(digraph);
   30.10  
   30.11    Digraph::Arc ga2 = digraph.addArc(n2, n1);
   30.12 +  ignore_unused_variable_warning(ga2);
   30.13  
   30.14    checkGraphNodeList(arc_set, 2);
   30.15    checkGraphArcList(arc_set, 0);
   30.16 @@ -75,6 +77,8 @@
   30.17    ArcSet::Arc a2 = arc_set.addArc(n2, n1),
   30.18      a3 = arc_set.addArc(n2, n3),
   30.19      a4 = arc_set.addArc(n2, n3);
   30.20 +  ignore_unused_variable_warning(a2,a3,a4);
   30.21 +
   30.22    checkGraphNodeList(arc_set, 3);
   30.23    checkGraphArcList(arc_set, 4);
   30.24  
   30.25 @@ -110,10 +114,12 @@
   30.26      n2 = digraph.addNode();
   30.27  
   30.28    Digraph::Arc ga1 = digraph.addArc(n1, n2);
   30.29 +  ignore_unused_variable_warning(ga1);
   30.30  
   30.31    ArcSet arc_set(digraph);
   30.32  
   30.33    Digraph::Arc ga2 = digraph.addArc(n2, n1);
   30.34 +  ignore_unused_variable_warning(ga2);
   30.35  
   30.36    checkGraphNodeList(arc_set, 2);
   30.37    checkGraphArcList(arc_set, 0);
   30.38 @@ -141,6 +147,8 @@
   30.39    ArcSet::Arc a2 = arc_set.addArc(n2, n1),
   30.40      a3 = arc_set.addArc(n2, n3),
   30.41      a4 = arc_set.addArc(n2, n3);
   30.42 +  ignore_unused_variable_warning(a2,a3,a4);
   30.43 +
   30.44    checkGraphNodeList(arc_set, 3);
   30.45    checkGraphArcList(arc_set, 4);
   30.46  
   30.47 @@ -190,10 +198,12 @@
   30.48      n2 = digraph.addNode();
   30.49  
   30.50    Digraph::Arc ga1 = digraph.addArc(n1, n2);
   30.51 +  ignore_unused_variable_warning(ga1);
   30.52  
   30.53    EdgeSet edge_set(digraph);
   30.54  
   30.55    Digraph::Arc ga2 = digraph.addArc(n2, n1);
   30.56 +  ignore_unused_variable_warning(ga2);
   30.57  
   30.58    checkGraphNodeList(edge_set, 2);
   30.59    checkGraphArcList(edge_set, 0);
   30.60 @@ -230,6 +240,8 @@
   30.61    EdgeSet::Edge e2 = edge_set.addEdge(n2, n1),
   30.62      e3 = edge_set.addEdge(n2, n3),
   30.63      e4 = edge_set.addEdge(n2, n3);
   30.64 +  ignore_unused_variable_warning(e2,e3,e4);
   30.65 +
   30.66    checkGraphNodeList(edge_set, 3);
   30.67    checkGraphEdgeList(edge_set, 4);
   30.68  
   30.69 @@ -274,10 +286,12 @@
   30.70      n2 = digraph.addNode();
   30.71  
   30.72    Digraph::Arc ga1 = digraph.addArc(n1, n2);
   30.73 +  ignore_unused_variable_warning(ga1);
   30.74  
   30.75    EdgeSet edge_set(digraph);
   30.76  
   30.77    Digraph::Arc ga2 = digraph.addArc(n2, n1);
   30.78 +  ignore_unused_variable_warning(ga2);
   30.79  
   30.80    checkGraphNodeList(edge_set, 2);
   30.81    checkGraphArcList(edge_set, 0);
   30.82 @@ -314,6 +328,8 @@
   30.83    EdgeSet::Edge e2 = edge_set.addEdge(n2, n1),
   30.84      e3 = edge_set.addEdge(n2, n3),
   30.85      e4 = edge_set.addEdge(n2, n3);
   30.86 +  ignore_unused_variable_warning(e2,e3,e4);
   30.87 +
   30.88    checkGraphNodeList(edge_set, 3);
   30.89    checkGraphEdgeList(edge_set, 4);
   30.90  
    31.1 --- a/test/euler_test.cc	Wed Sep 12 17:25:48 2012 +0200
    31.2 +++ b/test/euler_test.cc	Thu Sep 13 11:56:19 2012 +0200
    31.3 @@ -101,7 +101,8 @@
    31.4      Digraph d;
    31.5      Graph g(d);
    31.6      Digraph::Node n = d.addNode();
    31.7 -
    31.8 +    ignore_unused_variable_warning(n);
    31.9 +  
   31.10      checkDiEulerIt(d);
   31.11      checkDiEulerIt(g);
   31.12      checkEulerIt(g);
   31.13 @@ -189,6 +190,7 @@
   31.14      Digraph::Node n3 = d.addNode();
   31.15      Digraph::Node n4 = d.addNode();
   31.16      Digraph::Node n5 = d.addNode();
   31.17 +    ignore_unused_variable_warning(n0,n4,n5);
   31.18  
   31.19      d.addArc(n1, n2);
   31.20      d.addArc(n2, n3);
    32.1 --- a/test/graph_test.cc	Wed Sep 12 17:25:48 2012 +0200
    32.2 +++ b/test/graph_test.cc	Thu Sep 13 11:56:19 2012 +0200
    32.3 @@ -66,6 +66,7 @@
    32.4  
    32.5    Edge e2 = G.addEdge(n2, n1),
    32.6         e3 = G.addEdge(n2, n3);
    32.7 +  ignore_unused_variable_warning(e2,e3);
    32.8  
    32.9    checkGraphNodeList(G, 3);
   32.10    checkGraphEdgeList(G, 3);
   32.11 @@ -98,6 +99,7 @@
   32.12    Edge e1 = G.addEdge(n1, n2), e2 = G.addEdge(n2, n1),
   32.13         e3 = G.addEdge(n2, n3), e4 = G.addEdge(n1, n4),
   32.14         e5 = G.addEdge(n4, n3);
   32.15 +  ignore_unused_variable_warning(e1,e3,e4,e5);
   32.16  
   32.17    checkGraphNodeList(G, 4);
   32.18    checkGraphEdgeList(G, 5);
   32.19 @@ -177,6 +179,7 @@
   32.20    Edge e1 = G.addEdge(n1, n2), e2 = G.addEdge(n2, n1),
   32.21         e3 = G.addEdge(n2, n3), e4 = G.addEdge(n1, n4),
   32.22         e5 = G.addEdge(n4, n3);
   32.23 +  ignore_unused_variable_warning(e1,e3,e4,e5);
   32.24  
   32.25    // Check edge deletion
   32.26    G.erase(e2);
   32.27 @@ -217,6 +220,7 @@
   32.28    Node n1 = G.addNode(), n2 = G.addNode(), n3 = G.addNode();
   32.29    Edge e1 = G.addEdge(n1, n2), e2 = G.addEdge(n2, n1),
   32.30         e3 = G.addEdge(n2, n3);
   32.31 +  ignore_unused_variable_warning(e1,e2,e3);
   32.32  
   32.33    checkGraphNodeList(G, 3);
   32.34    checkGraphEdgeList(G, 3);
   32.35 @@ -381,6 +385,7 @@
   32.36    Edge
   32.37      e1 = g.addEdge(n1, n2),
   32.38      e2 = g.addEdge(n2, n3);
   32.39 +  ignore_unused_variable_warning(e2);
   32.40  
   32.41    check(g.valid(n1), "Wrong validity check");
   32.42    check(g.valid(e1), "Wrong validity check");
   32.43 @@ -519,6 +524,7 @@
   32.44    checkGraphArcList(G, dim * (1 << dim));
   32.45  
   32.46    Node n = G.nodeFromId(dim);
   32.47 +  ignore_unused_variable_warning(n);
   32.48  
   32.49    for (NodeIt n(G); n != INVALID; ++n) {
   32.50      checkGraphIncEdgeList(G, n, dim);
    33.1 --- a/test/lp_test.cc	Wed Sep 12 17:25:48 2012 +0200
    33.2 +++ b/test/lp_test.cc	Thu Sep 13 11:56:19 2012 +0200
    33.3 @@ -41,11 +41,38 @@
    33.4  
    33.5  using namespace lemon;
    33.6  
    33.7 +int countCols(LpBase & lp) {
    33.8 +  int count=0;
    33.9 +  for (LpBase::ColIt c(lp); c!=INVALID; ++c) ++count;
   33.10 +  return count;
   33.11 +}
   33.12 +
   33.13 +int countRows(LpBase & lp) {
   33.14 +  int count=0;
   33.15 +  for (LpBase::RowIt r(lp); r!=INVALID; ++r) ++count;
   33.16 +  return count;
   33.17 +}
   33.18 +
   33.19 +
   33.20  void lpTest(LpSolver& lp)
   33.21  {
   33.22  
   33.23    typedef LpSolver LP;
   33.24  
   33.25 +  // Test LpBase::clear()
   33.26 +  check(countRows(lp)==0, "Wrong number of rows");
   33.27 +  check(countCols(lp)==0, "Wrong number of cols");
   33.28 +  lp.addCol(); lp.addRow(); lp.addRow();
   33.29 +  check(countRows(lp)==2, "Wrong number of rows");
   33.30 +  check(countCols(lp)==1, "Wrong number of cols");
   33.31 +  lp.clear();
   33.32 +  check(countRows(lp)==0, "Wrong number of rows");
   33.33 +  check(countCols(lp)==0, "Wrong number of cols");
   33.34 +  lp.addCol(); lp.addCol(); lp.addCol(); lp.addRow();
   33.35 +  check(countRows(lp)==1, "Wrong number of rows");
   33.36 +  check(countCols(lp)==3, "Wrong number of cols");
   33.37 +  lp.clear();
   33.38 +
   33.39    std::vector<LP::Col> x(10);
   33.40    //  for(int i=0;i<10;i++) x.push_back(lp.addCol());
   33.41    lp.addColSet(x);
    34.1 --- a/test/maps_test.cc	Wed Sep 12 17:25:48 2012 +0200
    34.2 +++ b/test/maps_test.cc	Thu Sep 13 11:56:19 2012 +0200
    34.3 @@ -103,6 +103,7 @@
    34.4      checkConcept<ReadWriteMap<A,B>, NullMap<A,B> >();
    34.5      NullMap<A,B> map1;
    34.6      NullMap<A,B> map2 = map1;
    34.7 +    ignore_unused_variable_warning(map2);
    34.8      map1 = nullMap<A,B>();
    34.9    }
   34.10  
   34.11 @@ -113,11 +114,15 @@
   34.12      ConstMap<A,B> map1;
   34.13      ConstMap<A,B> map2 = B();
   34.14      ConstMap<A,B> map3 = map1;
   34.15 +    ignore_unused_variable_warning(map2,map3);
   34.16 +
   34.17      map1 = constMap<A>(B());
   34.18      map1 = constMap<A,B>();
   34.19      map1.setAll(B());
   34.20      ConstMap<A,C> map4(C(1));
   34.21      ConstMap<A,C> map5 = map4;
   34.22 +    ignore_unused_variable_warning(map5);
   34.23 +
   34.24      map4 = constMap<A>(C(2));
   34.25      map4.setAll(C(3));
   34.26  
   34.27 @@ -138,6 +143,8 @@
   34.28      checkConcept<ReadMap<A,A>, IdentityMap<A> >();
   34.29      IdentityMap<A> map1;
   34.30      IdentityMap<A> map2 = map1;
   34.31 +    ignore_unused_variable_warning(map2);
   34.32 +
   34.33      map1 = identityMap<A>();
   34.34  
   34.35      checkConcept<ReadMap<double,double>, IdentityMap<double> >();
   34.36 @@ -197,7 +204,9 @@
   34.37      typedef ComposeMap<DoubleMap, ReadMap<B,A> > CompMap;
   34.38      checkConcept<ReadMap<B,double>, CompMap>();
   34.39      CompMap map1 = CompMap(DoubleMap(),ReadMap<B,A>());
   34.40 +    ignore_unused_variable_warning(map1);
   34.41      CompMap map2 = composeMap(DoubleMap(), ReadMap<B,A>());
   34.42 +    ignore_unused_variable_warning(map2);
   34.43  
   34.44      SparseMap<double, bool> m1(false); m1[3.14] = true;
   34.45      RangeMap<double> m2(2); m2[0] = 3.0; m2[1] = 3.14;
   34.46 @@ -210,7 +219,9 @@
   34.47      typedef CombineMap<DoubleMap, DoubleMap, std::plus<double> > CombMap;
   34.48      checkConcept<ReadMap<A,double>, CombMap>();
   34.49      CombMap map1 = CombMap(DoubleMap(), DoubleMap());
   34.50 +    ignore_unused_variable_warning(map1);
   34.51      CombMap map2 = combineMap(DoubleMap(), DoubleMap(), std::plus<double>());
   34.52 +    ignore_unused_variable_warning(map2);
   34.53  
   34.54      check(combineMap(constMap<B,int,2>(), identityMap<B>(), &binc)[B()] == 3,
   34.55            "Something is wrong with CombineMap");
   34.56 @@ -222,11 +233,15 @@
   34.57      checkConcept<ReadMap<A,B>, FunctorToMap<F> >();
   34.58      FunctorToMap<F> map1;
   34.59      FunctorToMap<F> map2 = FunctorToMap<F>(F());
   34.60 +    ignore_unused_variable_warning(map2);
   34.61 +
   34.62      B b = functorToMap(F())[A()];
   34.63 +    ignore_unused_variable_warning(b);
   34.64  
   34.65      checkConcept<ReadMap<A,B>, MapToFunctor<ReadMap<A,B> > >();
   34.66      MapToFunctor<ReadMap<A,B> > map =
   34.67        MapToFunctor<ReadMap<A,B> >(ReadMap<A,B>());
   34.68 +    ignore_unused_variable_warning(map);
   34.69  
   34.70      check(functorToMap(&func)[A()] == 3,
   34.71            "Something is wrong with FunctorToMap");
   34.72 @@ -244,7 +259,10 @@
   34.73      checkConcept<ReadMap<double,double>,
   34.74        ConvertMap<ReadMap<double, int>, double> >();
   34.75      ConvertMap<RangeMap<bool>, int> map1(rangeMap(1, true));
   34.76 +    ignore_unused_variable_warning(map1);
   34.77      ConvertMap<RangeMap<bool>, int> map2 = convertMap<int>(rangeMap(2, false));
   34.78 +    ignore_unused_variable_warning(map2);
   34.79 +
   34.80    }
   34.81  
   34.82    // ForkMap
    35.1 --- a/test/path_test.cc	Wed Sep 12 17:25:48 2012 +0200
    35.2 +++ b/test/path_test.cc	Thu Sep 13 11:56:19 2012 +0200
    35.3 @@ -38,7 +38,36 @@
    35.4    checkConcept<concepts::Path<ListDigraph>, ListPath<ListDigraph> >();
    35.5  }
    35.6  
    35.7 +// Check if proper copy consructor is called (use valgrind for testing)
    35.8 +template<class _Path>
    35.9 +void checkCopy()
   35.10 +{
   35.11 +  ListDigraph g;
   35.12 +  ListDigraph::Arc a  = g.addArc(g.addNode(), g.addNode());
   35.13 +  
   35.14 +  _Path p,q;
   35.15 +  p.addBack(a);
   35.16 +  q=p;
   35.17 +  _Path r(p);
   35.18 +  StaticPath<ListDigraph> s(r);
   35.19 +}
   35.20 +  
   35.21  int main() {
   35.22    check_concepts();
   35.23 +
   35.24 +  checkCopy<Path<ListDigraph> >();
   35.25 +  checkCopy<SimplePath<ListDigraph> >();
   35.26 +  checkCopy<ListPath<ListDigraph> >();
   35.27 +
   35.28 +  ListDigraph g;
   35.29 +  ListDigraph::Arc a  = g.addArc(g.addNode(), g.addNode());
   35.30 +  
   35.31 +  Path<ListDigraph> p;
   35.32 +  StaticPath<ListDigraph> q,r;
   35.33 +  p.addBack(a);
   35.34 +  q=p;
   35.35 +  r=q;
   35.36 +  StaticPath<ListDigraph> s(q);
   35.37 +
   35.38    return 0;
   35.39  }
    36.1 --- a/test/time_measure_test.cc	Wed Sep 12 17:25:48 2012 +0200
    36.2 +++ b/test/time_measure_test.cc	Thu Sep 13 11:56:19 2012 +0200
    36.3 @@ -17,6 +17,7 @@
    36.4   */
    36.5  
    36.6  #include <lemon/time_measure.h>
    36.7 +#include <lemon/concept_check.h>
    36.8  
    36.9  using namespace lemon;
   36.10  
   36.11 @@ -32,7 +33,10 @@
   36.12    static Timer T;
   36.13  
   36.14    for(int i=0;i<1000;i++)
   36.15 -    TimeStamp x(T);
   36.16 +    {
   36.17 +      TimeStamp x(T);
   36.18 +      ignore_unused_variable_warning(x);
   36.19 +    }
   36.20  }
   36.21  
   36.22  int main()