Index: gtags
===================================================================
--- .hgtags	(revision 736)
+++ 	(revision )
@@ -1,4 +1,0 @@
-06f816565bef381024acd7c15beb74ba407e3546 r1.1
-78b7231f0b2e786f74a9b0dbb345fe8b17fa35f9 r1.1.1
-86a880ba752dd02bfa084223b3cdf1698e5c0830 r1.1.2
-dfdb58f52f0220ccfb6dbedfe2a0be7d99995e0a r1.1.3
Index: NEWS
===================================================================
--- NEWS	(revision 735)
+++ NEWS	(revision 663)
@@ -1,50 +1,2 @@
-2010-10-21 Version 1.1.3 released
-
-        Bugfix release.
-
-        #366: Fix Pred[Matrix]MapPath::empty()
-        #371: Bug fix in (di)graphCopy()
-              The target graph is cleared before adding nodes and arcs/edges.
-
-        #356: Fix multiple execution bug in weighted matchings
-        #364: Add missing UndirectedTags
-        #368: Fix the usage of std::numeric_limits<>::min() in Network Simplex
-        #372: Fix a critical bug in preflow
-
-2010-03-08 Version 1.1.2 released
-
-        Bugfix release.
-
-        #317: Fix (and improve) error message in mip_test.cc
-              Remove unnecessary OsiCbc dependency
-        #250: Fix in pathSource() and pathTarget()
-        #322: Distribute LEMONConfig.cmake.in
-        #321: Use pathCopy(from,to) instead of copyPath(to,from)
-        #330: Bug fix in map_extender.h
-        #335: Fix clear() function in ExtendFindEnum
-        #337: Use void* as LPX object pointer
-        #336: Fix the date field comment of graphToEps() output
-        #323: Bug fix in Suurballe
-
-2009-10-03 Version 1.1.1 released
-
-        Bugfix release.
-
-        #295: Suppress MSVC warnings using pragmas
-        ----: Various CMAKE related improvements
-              * Remove duplications from doc/CMakeLists.txt
-              * Rename documentation install folder from 'docs' to 'html'
-              * Add tools/CMakeLists.txt to the tarball
-              * Generate and install LEMONConfig.cmake
-              * Change the label of the html project in Visual Studio
-              * Fix the check for the 'long long' type
-              * Put the version string into config.h
-              * Minor CMake improvements
-              * Set the version to 'hg-tip' if everything fails
-        #311: Add missing 'explicit' keywords
-        #302: Fix the implementation and doc of CrossRefMap
-        #308: Remove duplicate list_graph.h entry from source list
-        #307: Bug fix in Preflow and Circulation
-
 2009-05-13 Version 1.1 released
 
Index: doc/Doxyfile.in
===================================================================
--- doc/Doxyfile.in	(revision 367)
+++ doc/Doxyfile.in	(revision 741)
@@ -1,3 +1,3 @@
-# Doxyfile 1.5.7.1
+# Doxyfile 1.5.9
 
 #---------------------------------------------------------------------------
@@ -22,5 +22,4 @@
 QT_AUTOBRIEF           = NO
 MULTILINE_CPP_IS_BRIEF = NO
-DETAILS_AT_TOP         = YES
 INHERIT_DOCS           = NO
 SEPARATE_MEMBER_PAGES  = NO
@@ -224,5 +223,5 @@
 SKIP_FUNCTION_MACROS   = YES
 #---------------------------------------------------------------------------
-# Configuration::additions related to external references   
+# Options related to the search engine   
 #---------------------------------------------------------------------------
 TAGFILES               = "@abs_top_srcdir@/doc/libstdc++.tag = http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/  "
Index: doc/groups.dox
===================================================================
--- doc/groups.dox	(revision 664)
+++ doc/groups.dox	(revision 661)
@@ -227,4 +227,12 @@
 
 /**
+@defgroup matrices Matrices
+@ingroup datas
+\brief Two dimensional data storages implemented in LEMON.
+
+This group contains two dimensional data storages implemented in LEMON.
+*/
+
+/**
 @defgroup paths Path Structures
 @ingroup datas
@@ -276,6 +284,14 @@
 This group contains the algorithms for finding shortest paths in digraphs.
 
- - \ref Dijkstra Dijkstra's algorithm for finding shortest paths from a 
-   source node when all arc lengths are non-negative.
+ - \ref Dijkstra algorithm for finding shortest paths from a source node
+   when all arc lengths are non-negative.
+ - \ref BellmanFord "Bellman-Ford" algorithm for finding shortest paths
+   from a source node when arc lenghts can be either positive or negative,
+   but the digraph should not contain directed cycles with negative total
+   length.
+ - \ref FloydWarshall "Floyd-Warshall" and \ref Johnson "Johnson" algorithms
+   for solving the \e all-pairs \e shortest \e paths \e problem when arc
+   lenghts can be either positive or negative, but the digraph should
+   not contain directed cycles with negative total length.
  - \ref Suurballe A successive shortest path algorithm for finding
    arc-disjoint paths between two nodes having minimum total length.
@@ -302,8 +318,14 @@
 \f[ 0 \leq f(uv) \leq cap(uv) \quad \forall uv\in A \f]
 
-\ref Preflow implements the preflow push-relabel algorithm of Goldberg and
-Tarjan for solving this problem. It also provides functions to query the
-minimum cut, which is the dual problem of maximum flow.
-
+LEMON contains several algorithms for solving maximum flow problems:
+- \ref EdmondsKarp Edmonds-Karp algorithm.
+- \ref Preflow Goldberg-Tarjan's preflow push-relabel algorithm.
+- \ref DinitzSleatorTarjan Dinitz's blocking flow algorithm with dynamic trees.
+- \ref GoldbergTarjan Preflow push-relabel algorithm with dynamic trees.
+
+In most cases the \ref Preflow "Preflow" algorithm provides the
+fastest method for computing a maximum flow. All implementations
+also provide functions to query the minimum cut, which is the dual
+problem of maximum flow.
 
 \ref Circulation is a preflow push-relabel algorithm implemented directly 
@@ -323,7 +345,18 @@
 solution see \ref min_cost_flow "Minimum Cost Flow Problem".
 
-\ref NetworkSimplex is an efficient implementation of the primal Network
-Simplex algorithm for finding minimum cost flows. It also provides dual
-solution (node potentials), if an optimal flow is found.
+LEMON contains several algorithms for this problem.
+ - \ref NetworkSimplex Primal Network Simplex algorithm with various
+   pivot strategies.
+ - \ref CostScaling Push-Relabel and Augment-Relabel algorithms based on
+   cost scaling.
+ - \ref CapacityScaling Successive Shortest %Path algorithm with optional
+   capacity scaling.
+ - \ref CancelAndTighten The Cancel and Tighten algorithm.
+ - \ref CycleCanceling Cycle-Canceling algorithms.
+
+In general NetworkSimplex is the most efficient implementation,
+but in special cases other algorithms could be faster.
+For example, if the total supply and/or capacities are rather small,
+CapacityScaling is usually the fastest algorithm (without effective scaling).
 */
 
@@ -349,4 +382,6 @@
 - \ref HaoOrlin "Hao-Orlin algorithm" for calculating minimum cut
   in directed graphs.
+- \ref NagamochiIbaraki "Nagamochi-Ibaraki algorithm" for
+  calculating minimum cut in undirected graphs.
 - \ref GomoryHu "Gomory-Hu tree computation" for calculating
   all-pairs minimum cut in undirected graphs.
@@ -369,14 +404,28 @@
 
 /**
+@defgroup planar Planarity Embedding and Drawing
+@ingroup algs
+\brief Algorithms for planarity checking, embedding and drawing
+
+This group contains the algorithms for planarity checking,
+embedding and drawing.
+
+\image html planar.png
+\image latex planar.eps "Plane graph" width=\textwidth
+*/
+
+/**
 @defgroup matching Matching Algorithms
 @ingroup algs
 \brief Algorithms for finding matchings in graphs and bipartite graphs.
 
-This group contains the algorithms for calculating matchings in graphs.
-The general matching problem is finding a subset of the edges for which
-each node has at most one incident edge.
+This group contains the algorithms for calculating
+matchings in graphs and bipartite graphs. The general matching problem is
+finding a subset of the edges for which each node has at most one incident
+edge.
 
 There are several different algorithms for calculate matchings in
-graphs. The goal of the matching optimization
+graphs.  The matching problems in bipartite graphs are generally
+easier than in general graphs. The goal of the matching optimization
 can be finding maximum cardinality, maximum weight or minimum cost
 matching. The search can be constrained to find perfect or
@@ -384,4 +433,14 @@
 
 The matching algorithms implemented in LEMON:
+- \ref MaxBipartiteMatching Hopcroft-Karp augmenting path algorithm
+  for calculating maximum cardinality matching in bipartite graphs.
+- \ref PrBipartiteMatching Push-relabel algorithm
+  for calculating maximum cardinality matching in bipartite graphs.
+- \ref MaxWeightedBipartiteMatching
+  Successive shortest path algorithm for calculating maximum weighted
+  matching and maximum weighted bipartite matching in bipartite graphs.
+- \ref MinCostMaxBipartiteMatching
+  Successive shortest path algorithm for calculating minimum cost maximum
+  matching in bipartite graphs.
 - \ref MaxMatching Edmond's blossom shrinking algorithm for calculating
   maximum cardinality matching in general graphs.
@@ -415,4 +474,13 @@
 
 /**
+@defgroup approx Approximation Algorithms
+@ingroup algs
+\brief Approximation algorithms.
+
+This group contains the approximation and heuristic algorithms
+implemented in LEMON.
+*/
+
+/**
 @defgroup gen_opt_group General Optimization Tools
 \brief This group contains some general optimization frameworks
@@ -431,4 +499,21 @@
 various LP solvers could be used in the same manner with this
 interface.
+*/
+
+/**
+@defgroup lp_utils Tools for Lp and Mip Solvers
+@ingroup lp_group
+\brief Helper tools to the Lp and Mip solvers.
+
+This group adds some helper tools to general optimization framework
+implemented in LEMON.
+*/
+
+/**
+@defgroup metah Metaheuristics
+@ingroup gen_opt_group
+\brief Metaheuristics for LEMON library.
+
+This group contains some metaheuristic optimization tools.
 */
 
Index: lemon/Makefile.am
===================================================================
--- lemon/Makefile.am	(revision 716)
+++ lemon/Makefile.am	(revision 666)
@@ -91,4 +91,5 @@
 	lemon/lp_base.h \
 	lemon/lp_skeleton.h \
+	lemon/list_graph.h \
 	lemon/maps.h \
 	lemon/matching.h \
Index: lemon/bits/edge_set_extender.h
===================================================================
--- lemon/bits/edge_set_extender.h	(revision 725)
+++ lemon/bits/edge_set_extender.h	(revision 609)
@@ -281,6 +281,4 @@
     typedef EdgeSetExtender Graph;
 
-    typedef True UndirectedTag;
-
     typedef typename Parent::Node Node;
     typedef typename Parent::Arc Arc;
@@ -540,5 +538,5 @@
 
     public:
-      explicit ArcMap(const Graph& _g) 
+      ArcMap(const Graph& _g) 
 	: Parent(_g) {}
       ArcMap(const Graph& _g, const _Value& _v) 
@@ -564,5 +562,5 @@
 
     public:
-      explicit EdgeMap(const Graph& _g) 
+      EdgeMap(const Graph& _g) 
 	: Parent(_g) {}
 
Index: lemon/bits/graph_adaptor_extender.h
===================================================================
--- lemon/bits/graph_adaptor_extender.h	(revision 724)
+++ lemon/bits/graph_adaptor_extender.h	(revision 609)
@@ -182,6 +182,4 @@
     typedef GraphAdaptorExtender Adaptor;
 
-    typedef True UndirectedTag;
-
     typedef typename Parent::Node Node;
     typedef typename Parent::Arc Arc;
Index: lemon/bits/graph_extender.h
===================================================================
--- lemon/bits/graph_extender.h	(revision 686)
+++ lemon/bits/graph_extender.h	(revision 609)
@@ -605,5 +605,5 @@
 
     public:
-      explicit NodeMap(const Graph& graph)
+      NodeMap(const Graph& graph)
         : Parent(graph) {}
       NodeMap(const Graph& graph, const _Value& value)
@@ -629,5 +629,5 @@
 
     public:
-      explicit ArcMap(const Graph& graph)
+      ArcMap(const Graph& graph)
         : Parent(graph) {}
       ArcMap(const Graph& graph, const _Value& value)
@@ -653,5 +653,5 @@
 
     public:
-      explicit EdgeMap(const Graph& graph)
+      EdgeMap(const Graph& graph)
         : Parent(graph) {}
 
Index: lemon/bits/map_extender.h
===================================================================
--- lemon/bits/map_extender.h	(revision 716)
+++ lemon/bits/map_extender.h	(revision 609)
@@ -83,34 +83,34 @@
       typedef typename Map::Value Value;
 
-      MapIt() : map(NULL) {}
-
-      MapIt(Invalid i) : Parent(i), map(NULL) {}
-
-      explicit MapIt(Map& _map) : map(&_map) {
-        map->notifier()->first(*this);
+      MapIt() {}
+
+      MapIt(Invalid i) : Parent(i) { }
+
+      explicit MapIt(Map& _map) : map(_map) {
+        map.notifier()->first(*this);
       }
 
       MapIt(const Map& _map, const Item& item)
-        : Parent(item), map(&_map) {}
+        : Parent(item), map(_map) {}
 
       MapIt& operator++() {
-        map->notifier()->next(*this);
+        map.notifier()->next(*this);
         return *this;
       }
 
       typename MapTraits<Map>::ConstReturnValue operator*() const {
-        return (*map)[*this];
+        return map[*this];
       }
 
       typename MapTraits<Map>::ReturnValue operator*() {
-        return (*map)[*this];
+        return map[*this];
       }
 
       void set(const Value& value) {
-        map->set(*this, value);
-      }
-
-    protected:
-      Map* map;
+        map.set(*this, value);
+      }
+
+    protected:
+      Map& map;
 
     };
@@ -123,10 +123,10 @@
       typedef typename Map::Value Value;
 
-      ConstMapIt() : map(NULL) {}
-
-      ConstMapIt(Invalid i) : Parent(i), map(NULL) {}
-
-      explicit ConstMapIt(Map& _map) : map(&_map) {
-        map->notifier()->first(*this);
+      ConstMapIt() {}
+
+      ConstMapIt(Invalid i) : Parent(i) { }
+
+      explicit ConstMapIt(Map& _map) : map(_map) {
+        map.notifier()->first(*this);
       }
 
@@ -135,5 +135,5 @@
 
       ConstMapIt& operator++() {
-        map->notifier()->next(*this);
+        map.notifier()->next(*this);
         return *this;
       }
@@ -144,5 +144,5 @@
 
     protected:
-      const Map* map;
+      const Map& map;
     };
 
@@ -151,23 +151,23 @@
 
     public:
-      ItemIt() : map(NULL) {}
-
-
-      ItemIt(Invalid i) : Parent(i), map(NULL) {}
-
-      explicit ItemIt(Map& _map) : map(&_map) {
-        map->notifier()->first(*this);
+
+      ItemIt() {}
+
+      ItemIt(Invalid i) : Parent(i) { }
+
+      explicit ItemIt(Map& _map) : map(_map) {
+        map.notifier()->first(*this);
       }
 
       ItemIt(const Map& _map, const Item& item)
-        : Parent(item), map(&_map) {}
+        : Parent(item), map(_map) {}
 
       ItemIt& operator++() {
-        map->notifier()->next(*this);
-        return *this;
-      }
-
-    protected:
-      const Map* map;
+        map.notifier()->next(*this);
+        return *this;
+      }
+
+    protected:
+      const Map& map;
 
     };
@@ -228,34 +228,34 @@
       typedef typename Map::Value Value;
 
-      MapIt() : map(NULL) {}
-
-      MapIt(Invalid i) : Parent(i), map(NULL) { }
-
-      explicit MapIt(Map& _map) : map(&_map) {
-        map->graph.first(*this);
+      MapIt() {}
+
+      MapIt(Invalid i) : Parent(i) { }
+
+      explicit MapIt(Map& _map) : map(_map) {
+        map.graph.first(*this);
       }
 
       MapIt(const Map& _map, const Item& item)
-        : Parent(item), map(&_map) {}
+        : Parent(item), map(_map) {}
 
       MapIt& operator++() {
-        map->graph.next(*this);
+        map.graph.next(*this);
         return *this;
       }
 
       typename MapTraits<Map>::ConstReturnValue operator*() const {
-        return (*map)[*this];
+        return map[*this];
       }
 
       typename MapTraits<Map>::ReturnValue operator*() {
-        return (*map)[*this];
+        return map[*this];
       }
 
       void set(const Value& value) {
-        map->set(*this, value);
-      }
-
-    protected:
-      Map* map;
+        map.set(*this, value);
+      }
+
+    protected:
+      Map& map;
 
     };
@@ -268,26 +268,26 @@
       typedef typename Map::Value Value;
 
-      ConstMapIt() : map(NULL) {}
-
-      ConstMapIt(Invalid i) : Parent(i), map(NULL) { }
-
-      explicit ConstMapIt(Map& _map) : map(&_map) {
-        map->graph.first(*this);
+      ConstMapIt() {}
+
+      ConstMapIt(Invalid i) : Parent(i) { }
+
+      explicit ConstMapIt(Map& _map) : map(_map) {
+        map.graph.first(*this);
       }
 
       ConstMapIt(const Map& _map, const Item& item)
-        : Parent(item), map(&_map) {}
+        : Parent(item), map(_map) {}
 
       ConstMapIt& operator++() {
-        map->graph.next(*this);
+        map.graph.next(*this);
         return *this;
       }
 
       typename MapTraits<Map>::ConstReturnValue operator*() const {
-        return (*map)[*this];
-      }
-
-    protected:
-      const Map* map;
+        return map[*this];
+      }
+
+    protected:
+      const Map& map;
     };
 
@@ -296,23 +296,23 @@
 
     public:
-      ItemIt() : map(NULL) {}
-
-
-      ItemIt(Invalid i) : Parent(i), map(NULL) { }
-
-      explicit ItemIt(Map& _map) : map(&_map) {
-        map->graph.first(*this);
+
+      ItemIt() {}
+
+      ItemIt(Invalid i) : Parent(i) { }
+
+      explicit ItemIt(Map& _map) : map(_map) {
+        map.graph.first(*this);
       }
 
       ItemIt(const Map& _map, const Item& item)
-        : Parent(item), map(&_map) {}
+        : Parent(item), map(_map) {}
 
       ItemIt& operator++() {
-        map->graph.next(*this);
-        return *this;
-      }
-
-    protected:
-      const Map* map;
+        map.graph.next(*this);
+        return *this;
+      }
+
+    protected:
+      const Map& map;
 
     };
Index: lemon/bits/path_dump.h
===================================================================
--- lemon/bits/path_dump.h	(revision 728)
+++ lemon/bits/path_dump.h	(revision 514)
@@ -50,5 +50,5 @@
 
     bool empty() const {
-      return predMap[target] == INVALID;
+      return predMap[target] != INVALID;
     }
 
@@ -124,5 +124,5 @@
 
     bool empty() const {
-      return predMatrixMap(source, target) == INVALID;
+      return source != target;
     }
 
Index: lemon/core.h
===================================================================
--- lemon/core.h	(revision 734)
+++ lemon/core.h	(revision 672)
@@ -395,5 +395,4 @@
       static void copy(const From& from, Digraph &to,
                        NodeRefMap& nodeRefMap, ArcRefMap& arcRefMap) {
-        to.clear();
         for (typename From::NodeIt it(from); it != INVALID; ++it) {
           nodeRefMap[it] = to.addNode();
@@ -423,5 +422,4 @@
       static void copy(const From& from, Graph &to,
                        NodeRefMap& nodeRefMap, EdgeRefMap& edgeRefMap) {
-        to.clear();
         for (typename From::NodeIt it(from); it != INVALID; ++it) {
           nodeRefMap[it] = to.addNode();
Index: lemon/dfs.h
===================================================================
--- lemon/dfs.h	(revision 738)
+++ lemon/dfs.h	(revision 576)
@@ -558,5 +558,5 @@
     void start(Node t)
     {
-      while ( !emptyQueue() && !(*_reached)[t] )
+      while ( !emptyQueue() && G->target(_stack[_stack_head])!=t )
         processNextArc();
     }
@@ -1510,5 +1510,5 @@
     /// with addSource() before using this function.
     void start(Node t) {
-      while ( !emptyQueue() && !(*_reached)[t] )
+      while ( !emptyQueue() && _digraph->target(_stack[_stack_head]) != t )
         processNextArc();
     }
Index: lemon/glpk.h
===================================================================
--- lemon/glpk.h	(revision 711)
+++ lemon/glpk.h	(revision 648)
@@ -26,26 +26,14 @@
 #include <lemon/lp_base.h>
 
+// forward declaration
+#if !defined _GLP_PROB && !defined GLP_PROB
+#define _GLP_PROB
+#define GLP_PROB
+typedef struct { double _opaque_prob; } glp_prob;
+/* LP/MIP problem object */
+#endif
+
 namespace lemon {
 
-  namespace _solver_bits {
-    class VoidPtr {
-    private:
-      void *_ptr;      
-    public:
-      VoidPtr() : _ptr(0) {}
-
-      template <typename T>
-      VoidPtr(T* ptr) : _ptr(reinterpret_cast<void*>(ptr)) {}
-
-      template <typename T>
-      VoidPtr& operator=(T* ptr) { 
-        _ptr = reinterpret_cast<void*>(ptr); 
-        return *this;
-      }
-
-      template <typename T>
-      operator T*() const { return reinterpret_cast<T*>(_ptr); }
-    };
-  }
 
   /// \brief Base interface for the GLPK LP and MIP solver
@@ -56,5 +44,6 @@
   protected:
 
-    _solver_bits::VoidPtr lp;
+    typedef glp_prob LPX;
+    glp_prob* lp;
 
     GlpkBase();
@@ -134,7 +123,7 @@
 
     ///Pointer to the underlying GLPK data structure.
-    _solver_bits::VoidPtr lpx() {return lp;}
+    LPX *lpx() {return lp;}
     ///Const pointer to the underlying GLPK data structure.
-    _solver_bits::VoidPtr lpx() const {return lp;}
+    const LPX *lpx() const {return lp;}
 
     ///Returns the constraint identifier understood by GLPK.
Index: lemon/graph_to_eps.h
===================================================================
--- lemon/graph_to_eps.h	(revision 714)
+++ lemon/graph_to_eps.h	(revision 609)
@@ -685,7 +685,7 @@
 #else
       os << bits::getWinFormattedDate();
-      os << std::endl;
 #endif
     }
+    os << std::endl;
 
     if (_autoArcWidthScale) {
Index: lemon/maps.h
===================================================================
--- lemon/maps.h	(revision 684)
+++ lemon/maps.h	(revision 609)
@@ -1903,11 +1903,10 @@
 
   /// This class provides simple invertable graph maps.
-  /// It wraps a standard graph map (\c NodeMap, \c ArcMap or \c EdgeMap)
-  /// and if a key is set to a new value, then stores it in the inverse map.
+  /// It wraps an arbitrary \ref concepts::ReadWriteMap "ReadWriteMap"
+  /// and if a key is set to a new value then store it
+  /// in the inverse map.
+  ///
   /// The values of the map can be accessed
   /// with stl compatible forward iterator.
-  ///
-  /// This type is not reference map, so it cannot be modified with
-  /// the subscript operator.
   ///
   /// \tparam GR The graph type.
@@ -1925,5 +1924,5 @@
       template Map<V>::Type Map;
 
-    typedef std::multimap<V, K> Container;
+    typedef std::map<V, K> Container;
     Container _inv_map;
 
@@ -1950,6 +1949,4 @@
     /// iterator on the values of the map. The values can
     /// be accessed in the <tt>[beginValue, endValue)</tt> range.
-    /// They are considered with multiplicity, so each value is
-    /// traversed for each item it is assigned to.
     class ValueIterator
       : public std::iterator<std::forward_iterator_tag, Value> {
@@ -2004,13 +2001,9 @@
     void set(const Key& key, const Value& val) {
       Value oldval = Map::operator[](key);
-      typename Container::iterator it;
-      for (it = _inv_map.equal_range(oldval).first;
-           it != _inv_map.equal_range(oldval).second; ++it) {
-        if (it->second == key) {
-          _inv_map.erase(it);
-          break;
-        }
+      typename Container::iterator it = _inv_map.find(oldval);
+      if (it != _inv_map.end() && it->second == key) {
+        _inv_map.erase(it);
       }
-      _inv_map.insert(std::make_pair(val, key));
+      _inv_map.insert(make_pair(val, key));
       Map::set(key, val);
     }
@@ -2024,12 +2017,9 @@
     }
 
-    /// \brief Gives back an item by its value.
-    ///
-    /// This function gives back an item that is assigned to
-    /// the given value or \c INVALID if no such item exists.
-    /// If there are more items with the same associated value,
-    /// only one of them is returned.
-    Key operator()(const Value& val) const {
-      typename Container::const_iterator it = _inv_map.find(val);
+    /// \brief Gives back the item by its value.
+    ///
+    /// Gives back the item by its value.
+    Key operator()(const Value& key) const {
+      typename Container::const_iterator it = _inv_map.find(key);
       return it != _inv_map.end() ? it->second : INVALID;
     }
@@ -2043,11 +2033,7 @@
     virtual void erase(const Key& key) {
       Value val = Map::operator[](key);
-      typename Container::iterator it;
-      for (it = _inv_map.equal_range(val).first;
-           it != _inv_map.equal_range(val).second; ++it) {
-        if (it->second == key) {
-          _inv_map.erase(it);
-          break;
-        }
+      typename Container::iterator it = _inv_map.find(val);
+      if (it != _inv_map.end() && it->second == key) {
+        _inv_map.erase(it);
       }
       Map::erase(key);
@@ -2061,11 +2047,7 @@
       for (int i = 0; i < int(keys.size()); ++i) {
         Value val = Map::operator[](keys[i]);
-        typename Container::iterator it;
-        for (it = _inv_map.equal_range(val).first;
-             it != _inv_map.equal_range(val).second; ++it) {
-          if (it->second == keys[i]) {
-            _inv_map.erase(it);
-            break;
-          }
+        typename Container::iterator it = _inv_map.find(val);
+        if (it != _inv_map.end() && it->second == keys[i]) {
+          _inv_map.erase(it);
         }
       }
@@ -2103,7 +2085,6 @@
       /// \brief Subscript operator.
       ///
-      /// Subscript operator. It gives back an item
-      /// that is assigned to the given value or \c INVALID
-      /// if no such item exists.
+      /// Subscript operator. It gives back the item
+      /// that was last assigned to the given value.
       Value operator[](const Key& key) const {
         return _inverted(key);
Index: lemon/path.h
===================================================================
--- lemon/path.h	(revision 709)
+++ lemon/path.h	(revision 550)
@@ -71,5 +71,5 @@
     template <typename CPath>
     Path(const CPath& cpath) {
-      pathCopy(cpath, *this);
+      copyPath(*this, cpath);
     }
 
@@ -79,5 +79,5 @@
     template <typename CPath>
     Path& operator=(const CPath& cpath) {
-      pathCopy(cpath, *this);
+      copyPath(*this, cpath);
       return *this;
     }
@@ -259,5 +259,5 @@
     template <typename CPath>
     SimplePath(const CPath& cpath) {
-      pathCopy(cpath, *this);
+      copyPath(*this, cpath);
     }
 
@@ -268,5 +268,5 @@
     template <typename CPath>
     SimplePath& operator=(const CPath& cpath) {
-      pathCopy(cpath, *this);
+      copyPath(*this, cpath);
       return *this;
     }
@@ -438,5 +438,5 @@
     template <typename CPath>
     ListPath(const CPath& cpath) : first(0), last(0) {
-      pathCopy(cpath, *this);
+      copyPath(*this, cpath);
     }
 
@@ -454,5 +454,5 @@
     template <typename CPath>
     ListPath& operator=(const CPath& cpath) {
-      pathCopy(cpath, *this);
+      copyPath(*this, cpath);
       return *this;
     }
@@ -764,5 +764,5 @@
     template <typename CPath>
     StaticPath(const CPath& cpath) : arcs(0) {
-      pathCopy(cpath, *this);
+      copyPath(*this, cpath);
     }
 
@@ -780,5 +780,5 @@
     template <typename CPath>
     StaticPath& operator=(const CPath& cpath) {
-      pathCopy(cpath, *this);
+      copyPath(*this, cpath);
       return *this;
     }
@@ -929,55 +929,55 @@
     };
 
-    template <typename From, typename To,
-              bool buildEnable = BuildTagIndicator<To>::value>
+    template <typename Target, typename Source,
+              bool buildEnable = BuildTagIndicator<Target>::value>
     struct PathCopySelectorForward {
-      static void copy(const From& from, To& to) {
-        to.clear();
-        for (typename From::ArcIt it(from); it != INVALID; ++it) {
-          to.addBack(it);
+      static void copy(Target& target, const Source& source) {
+        target.clear();
+        for (typename Source::ArcIt it(source); it != INVALID; ++it) {
+          target.addBack(it);
         }
       }
     };
 
-    template <typename From, typename To>
-    struct PathCopySelectorForward<From, To, true> {
-      static void copy(const From& from, To& to) {
-        to.clear();
-        to.build(from);
-      }
-    };
-
-    template <typename From, typename To,
-              bool buildEnable = BuildTagIndicator<To>::value>
+    template <typename Target, typename Source>
+    struct PathCopySelectorForward<Target, Source, true> {
+      static void copy(Target& target, const Source& source) {
+        target.clear();
+        target.build(source);
+      }
+    };
+
+    template <typename Target, typename Source,
+              bool buildEnable = BuildTagIndicator<Target>::value>
     struct PathCopySelectorBackward {
-      static void copy(const From& from, To& to) {
-        to.clear();
-        for (typename From::RevArcIt it(from); it != INVALID; ++it) {
-          to.addFront(it);
+      static void copy(Target& target, const Source& source) {
+        target.clear();
+        for (typename Source::RevArcIt it(source); it != INVALID; ++it) {
+          target.addFront(it);
         }
       }
     };
 
-    template <typename From, typename To>
-    struct PathCopySelectorBackward<From, To, true> {
-      static void copy(const From& from, To& to) {
-        to.clear();
-        to.buildRev(from);
+    template <typename Target, typename Source>
+    struct PathCopySelectorBackward<Target, Source, true> {
+      static void copy(Target& target, const Source& source) {
+        target.clear();
+        target.buildRev(source);
       }
     };
 
     
-    template <typename From, typename To,
-              bool revEnable = RevPathTagIndicator<From>::value>
+    template <typename Target, typename Source,
+              bool revEnable = RevPathTagIndicator<Source>::value>
     struct PathCopySelector {
-      static void copy(const From& from, To& to) {
-        PathCopySelectorForward<From, To>::copy(from, to);
+      static void copy(Target& target, const Source& source) {
+        PathCopySelectorForward<Target, Source>::copy(target, source);
       }      
     };
 
-    template <typename From, typename To>
-    struct PathCopySelector<From, To, true> {
-      static void copy(const From& from, To& to) {
-        PathCopySelectorBackward<From, To>::copy(from, to);
+    template <typename Target, typename Source>
+    struct PathCopySelector<Target, Source, true> {
+      static void copy(Target& target, const Source& source) {
+        PathCopySelectorBackward<Target, Source>::copy(target, source);
       }      
     };
@@ -988,17 +988,9 @@
   /// \brief Make a copy of a path.
   ///
-  /// This function makes a copy of a path.
-  template <typename From, typename To>
-  void pathCopy(const From& from, To& to) {
-    checkConcept<concepts::PathDumper<typename From::Digraph>, From>();
-    _path_bits::PathCopySelector<From, To>::copy(from, to);
-  }
-
-  /// \brief Deprecated version of \ref pathCopy().
-  ///
-  /// Deprecated version of \ref pathCopy() (only for reverse compatibility).
-  template <typename To, typename From>
-  void copyPath(To& to, const From& from) {
-    pathCopy(from, to);
+  ///  This function makes a copy of a path.
+  template <typename Target, typename Source>
+  void copyPath(Target& target, const Source& source) {
+    checkConcept<concepts::PathDumper<typename Source::Digraph>, Source>();
+    _path_bits::PathCopySelector<Target, Source>::copy(target, source);
   }
 
@@ -1024,18 +1016,16 @@
   /// \brief The source of a path
   ///
-  /// This function returns the source node of the given path.
-  /// If the path is empty, then it returns \c INVALID.
+  /// This function returns the source of the given path.
   template <typename Digraph, typename Path>
   typename Digraph::Node pathSource(const Digraph& digraph, const Path& path) {
-    return path.empty() ? INVALID : digraph.source(path.front());
+    return digraph.source(path.front());
   }
 
   /// \brief The target of a path
   ///
-  /// This function returns the target node of the given path.
-  /// If the path is empty, then it returns \c INVALID.
+  /// This function returns the target of the given path.
   template <typename Digraph, typename Path>
   typename Digraph::Node pathTarget(const Digraph& digraph, const Path& path) {
-    return path.empty() ? INVALID : digraph.target(path.back());
+    return digraph.target(path.back());
   }
 
Index: lemon/suurballe.h
===================================================================
--- lemon/suurballe.h	(revision 719)
+++ lemon/suurballe.h	(revision 718)
@@ -46,6 +46,6 @@
   /// Note that this problem is a special case of the \ref min_cost_flow
   /// "minimum cost flow problem". This implementation is actually an
-  /// efficient specialized version of the Successive Shortest Path
-  /// algorithm directly for this problem.
+  /// efficient specialized version of the \ref CapacityScaling
+  /// "Successive Shortest Path" algorithm directly for this problem.
   /// Therefore this class provides query functions for flow values and
   /// node potentials (the dual solution) just like the minimum cost flow
Index: test/dfs_test.cc
===================================================================
--- test/dfs_test.cc	(revision 738)
+++ test/dfs_test.cc	(revision 577)
@@ -51,8 +51,5 @@
   "@attributes\n"
   "source 0\n"
-  "target 5\n"
-  "source1 6\n"
-  "target1 3\n";
-
+  "target 5\n";
 
 void checkDfsCompile()
@@ -183,5 +180,4 @@
   Digraph G;
   Node s, t;
-  Node s1, t1;
 
   std::istringstream input(test_lgf);
@@ -189,6 +185,4 @@
     node("source", s).
     node("target", t).
-    node("source1", s1).
-    node("target1", t1).
     run();
 
@@ -217,9 +211,4 @@
 
   {
-  Dfs<Digraph> dfs(G);
-  check(dfs.run(s1,t1) && dfs.reached(t1),"Node 3 is reachable from Node 6.");
-  }
-  
-  {
     NullMap<Node,Arc> myPredMap;
     dfs(G).predMap(myPredMap).run(s);
Index: test/graph_copy_test.cc
===================================================================
--- test/graph_copy_test.cc	(revision 734)
+++ test/graph_copy_test.cc	(revision 440)
@@ -30,5 +30,4 @@
   const int nn = 10;
 
-  // Build a digraph
   SmartDigraph from;
   SmartDigraph::NodeMap<int> fnm(from);
@@ -53,5 +52,4 @@
   }
 
-  // Test digraph copy
   ListDigraph to;
   ListDigraph::NodeMap<int> tnm(to);
@@ -71,7 +69,4 @@
     nodeCrossRef(ncr).arcCrossRef(ecr).
     node(fn, tn).arc(fa, ta).run();
-  
-  check(countNodes(from) == countNodes(to), "Wrong copy.");
-  check(countArcs(from) == countArcs(to), "Wrong copy.");
 
   for (SmartDigraph::NodeIt it(from); it != INVALID; ++it) {
@@ -96,10 +91,4 @@
   check(tn == nr[fn], "Wrong copy.");
   check(ta == er[fa], "Wrong copy.");
-
-  // Test repeated copy
-  digraphCopy(from, to).run();
-  
-  check(countNodes(from) == countNodes(to), "Wrong copy.");
-  check(countArcs(from) == countArcs(to), "Wrong copy.");
 }
 
@@ -107,5 +96,4 @@
   const int nn = 10;
 
-  // Build a graph
   SmartGraph from;
   SmartGraph::NodeMap<int> fnm(from);
@@ -135,5 +123,4 @@
   }
 
-  // Test graph copy
   ListGraph to;
   ListGraph::NodeMap<int> tnm(to);
@@ -157,8 +144,4 @@
     nodeCrossRef(ncr).arcCrossRef(acr).edgeCrossRef(ecr).
     node(fn, tn).arc(fa, ta).edge(fe, te).run();
-
-  check(countNodes(from) == countNodes(to), "Wrong copy.");
-  check(countEdges(from) == countEdges(to), "Wrong copy.");
-  check(countArcs(from) == countArcs(to), "Wrong copy.");
 
   for (SmartGraph::NodeIt it(from); it != INVALID; ++it) {
@@ -198,11 +181,4 @@
   check(ta == ar[fa], "Wrong copy.");
   check(te == er[fe], "Wrong copy.");
-
-  // Test repeated copy
-  graphCopy(from, to).run();
-  
-  check(countNodes(from) == countNodes(to), "Wrong copy.");
-  check(countEdges(from) == countEdges(to), "Wrong copy.");
-  check(countArcs(from) == countArcs(to), "Wrong copy.");
 }
 
Index: test/maps_test.cc
===================================================================
--- test/maps_test.cc	(revision 684)
+++ test/maps_test.cc	(revision 477)
@@ -23,5 +23,4 @@
 #include <lemon/concepts/maps.h>
 #include <lemon/maps.h>
-#include <lemon/list_graph.h>
 
 #include "test_tools.h"
@@ -350,38 +349,4 @@
       check(v1[i++] == *it, "Something is wrong with LoggerBoolMap");
   }
-  
-  // CrossRefMap
-  {
-    typedef ListDigraph Graph;
-    DIGRAPH_TYPEDEFS(Graph);
-
-    checkConcept<ReadWriteMap<Node, int>,
-                 CrossRefMap<Graph, Node, int> >();
-    
-    Graph gr;
-    typedef CrossRefMap<Graph, Node, char> CRMap;
-    typedef CRMap::ValueIterator ValueIt;
-    CRMap map(gr);
-    
-    Node n0 = gr.addNode();
-    Node n1 = gr.addNode();
-    Node n2 = gr.addNode();
-    
-    map.set(n0, 'A');
-    map.set(n1, 'B');
-    map.set(n2, 'C');
-    map.set(n2, 'A');
-    map.set(n0, 'C');
-
-    check(map[n0] == 'C' && map[n1] == 'B' && map[n2] == 'A',
-          "Wrong CrossRefMap");
-    check(map('A') == n2 && map.inverse()['A'] == n2, "Wrong CrossRefMap");
-    check(map('B') == n1 && map.inverse()['B'] == n1, "Wrong CrossRefMap");
-    check(map('C') == n0 && map.inverse()['C'] == n0, "Wrong CrossRefMap");
-
-    ValueIt it = map.beginValue();
-    check(*it++ == 'A' && *it++ == 'B' && *it++ == 'C' &&
-          it == map.endValue(), "Wrong value iterator");
-  }
 
   return 0;
