Index: doc/min_cost_flow.dox
===================================================================
--- doc/min_cost_flow.dox	(revision 835)
+++ doc/min_cost_flow.dox	(revision 802)
@@ -79,5 +79,5 @@
    - if \f$cost^\pi(uv)<0\f$, then \f$f(uv)=upper(uv)\f$.
  - For all \f$u\in V\f$ nodes:
-   - \f$\pi(u)\leq 0\f$;
+   - \f$\pi(u)<=0\f$;
    - if \f$\sum_{uv\in A} f(uv) - \sum_{vu\in A} f(vu) \neq sup(u)\f$,
      then \f$\pi(u)=0\f$.
@@ -146,5 +146,5 @@
    - if \f$cost^\pi(uv)<0\f$, then \f$f(uv)=upper(uv)\f$.
  - For all \f$u\in V\f$ nodes:
-   - \f$\pi(u)\geq 0\f$;
+   - \f$\pi(u)>=0\f$;
    - if \f$\sum_{uv\in A} f(uv) - \sum_{vu\in A} f(vu) \neq sup(u)\f$,
      then \f$\pi(u)=0\f$.
Index: lemon/adaptors.h
===================================================================
--- lemon/adaptors.h	(revision 834)
+++ lemon/adaptors.h	(revision 703)
@@ -361,7 +361,4 @@
   /// parameter is set to be \c const.
   ///
-  /// This class provides item counting in the same time as the adapted
-  /// digraph structure.
-  ///
   /// \tparam DGR The type of the adapted digraph.
   /// It must conform to the \ref concepts::Digraph "Digraph" concept.
@@ -722,6 +719,4 @@
   /// by adding or removing nodes or arcs, unless the \c GR template
   /// parameter is set to be \c const.
-  ///
-  /// This class provides only linear time counting for nodes and arcs.
   ///
   /// \tparam DGR The type of the adapted digraph.
@@ -1320,6 +1315,4 @@
   /// parameter is set to be \c const.
   ///
-  /// This class provides only linear time counting for nodes, edges and arcs.
-  ///
   /// \tparam GR The type of the adapted graph.
   /// It must conform to the \ref concepts::Graph "Graph" concept.
@@ -1478,6 +1471,4 @@
   /// by adding or removing nodes or arcs/edges, unless the \c GR template
   /// parameter is set to be \c const.
-  ///
-  /// This class provides only linear time item counting.
   ///
   /// \tparam GR The type of the adapted digraph or graph.
@@ -1629,6 +1620,4 @@
   /// parameter is set to be \c const.
   ///
-  /// This class provides only linear time counting for nodes and arcs.
-  ///
   /// \tparam DGR The type of the adapted digraph.
   /// It must conform to the \ref concepts::Digraph "Digraph" concept.
@@ -1740,6 +1729,4 @@
   /// by adding or removing nodes or edges, unless the \c GR template
   /// parameter is set to be \c const.
-  ///
-  /// This class provides only linear time counting for nodes, edges and arcs.
   ///
   /// \tparam GR The type of the adapted graph.
@@ -2246,7 +2233,4 @@
   /// parameter is set to be \c const.
   ///
-  /// This class provides item counting in the same time as the adapted
-  /// digraph structure.
-  ///
   /// \tparam DGR The type of the adapted digraph.
   /// It must conform to the \ref concepts::Digraph "Digraph" concept.
@@ -2551,7 +2535,4 @@
   /// by adding or removing nodes or arcs, unless the \c GR template
   /// parameter is set to be \c const.
-  ///
-  /// This class provides item counting in the same time as the adapted
-  /// graph structure.
   ///
   /// \tparam GR The type of the adapted graph.
@@ -2697,6 +2678,4 @@
   /// arcs).
   /// This class conforms to the \ref concepts::Digraph "Digraph" concept.
-  ///
-  /// This class provides only linear time counting for nodes and arcs.
   ///
   /// \tparam DGR The type of the adapted digraph.
@@ -3347,7 +3326,4 @@
   /// in the adaptor.
   ///
-  /// This class provides item counting in the same time as the adapted
-  /// digraph structure.
-  ///
   /// \tparam DGR The type of the adapted digraph.
   /// It must conform to the \ref concepts::Digraph "Digraph" concept.
Index: lemon/bellman_ford.h
===================================================================
--- lemon/bellman_ford.h	(revision 835)
+++ lemon/bellman_ford.h	(revision 828)
@@ -301,5 +301,5 @@
     /// \ref named-templ-param "Named parameter" for setting
     /// \c OperationTraits type.
-    /// For more information, see \ref BellmanFordDefaultOperationTraits.
+    /// For more information see \ref BellmanFordDefaultOperationTraits.
     template <class T>
     struct SetOperationTraits
@@ -719,5 +719,5 @@
     ///
     /// The shortest path tree used here is equal to the shortest path
-    /// tree used in \ref predNode() and \ref predMap().
+    /// tree used in \ref predNode() and \predMap().
     ///
     /// \pre Either \ref run() or \ref init() must be called before
@@ -734,5 +734,5 @@
     ///
     /// The shortest path tree used here is equal to the shortest path
-    /// tree used in \ref predArc() and \ref predMap().
+    /// tree used in \ref predArc() and \predMap().
     ///
     /// \pre Either \ref run() or \ref init() must be called before
Index: lemon/bfs.h
===================================================================
--- lemon/bfs.h	(revision 835)
+++ lemon/bfs.h	(revision 764)
@@ -64,5 +64,5 @@
     ///The type of the map that indicates which nodes are processed.
     ///It must conform to the \ref concepts::WriteMap "WriteMap" concept.
-    ///By default, it is a NullMap.
+    ///By default it is a NullMap.
     typedef NullMap<typename Digraph::Node,bool> ProcessedMap;
     ///Instantiates a \c ProcessedMap.
@@ -702,6 +702,10 @@
     ///Runs the algorithm to visit all nodes in the digraph.
 
-    ///This method runs the %BFS algorithm in order to visit all nodes
-    ///in the digraph.
+    ///This method runs the %BFS algorithm in order to
+    ///compute the shortest path to each node.
+    ///
+    ///The algorithm computes
+    ///- the shortest path tree (forest),
+    ///- the distance of each node from the root(s).
     ///
     ///\note <tt>b.run(s)</tt> is just a shortcut of the following code.
@@ -849,5 +853,5 @@
     ///The type of the map that indicates which nodes are processed.
     ///It must conform to the \ref concepts::WriteMap "WriteMap" concept.
-    ///By default, it is a NullMap.
+    ///By default it is a NullMap.
     typedef NullMap<typename Digraph::Node,bool> ProcessedMap;
     ///Instantiates a ProcessedMap.
@@ -1043,6 +1047,6 @@
     ///Runs BFS algorithm to visit all nodes in the digraph.
 
-    ///This method runs BFS algorithm in order to visit all nodes
-    ///in the digraph.
+    ///This method runs BFS algorithm in order to compute
+    ///the shortest path to each node.
     void run()
     {
@@ -1692,6 +1696,10 @@
     /// \brief Runs the algorithm to visit all nodes in the digraph.
     ///
-    /// This method runs the %BFS algorithm in order to visit all nodes
-    /// in the digraph.
+    /// This method runs the %BFS algorithm in order to
+    /// compute the shortest path to each node.
+    ///
+    /// The algorithm computes
+    /// - the shortest path tree (forest),
+    /// - the distance of each node from the root(s).
     ///
     /// \note <tt>b.run(s)</tt> is just a shortcut of the following code.
Index: lemon/circulation.h
===================================================================
--- lemon/circulation.h	(revision 833)
+++ lemon/circulation.h	(revision 762)
@@ -307,5 +307,5 @@
     /// able to automatically created by the algorithm (i.e. the
     /// digraph and the maximum level should be passed to it).
-    /// However, an external elevator object could also be passed to the
+    /// However an external elevator object could also be passed to the
     /// algorithm with the \ref elevator(Elevator&) "elevator()" function
     /// before calling \ref run() or \ref init().
Index: lemon/concepts/digraph.h
===================================================================
--- lemon/concepts/digraph.h	(revision 833)
+++ lemon/concepts/digraph.h	(revision 781)
@@ -108,5 +108,5 @@
 
       /// This iterator goes through each node of the digraph.
-      /// Its usage is quite simple, for example, you can count the number
+      /// Its usage is quite simple, for example you can count the number
       /// of nodes in a digraph \c g of type \c %Digraph like this:
       ///\code
@@ -197,5 +197,5 @@
       /// This iterator goes trough the \e outgoing arcs of a certain node
       /// of a digraph.
-      /// Its usage is quite simple, for example, you can count the number
+      /// Its usage is quite simple, for example you can count the number
       /// of outgoing arcs of a node \c n
       /// in a digraph \c g of type \c %Digraph as follows.
@@ -242,5 +242,5 @@
       /// This iterator goes trough the \e incoming arcs of a certain node
       /// of a digraph.
-      /// Its usage is quite simple, for example, you can count the number
+      /// Its usage is quite simple, for example you can count the number
       /// of incoming arcs of a node \c n
       /// in a digraph \c g of type \c %Digraph as follows.
@@ -286,5 +286,5 @@
 
       /// This iterator goes through each arc of the digraph.
-      /// Its usage is quite simple, for example, you can count the number
+      /// Its usage is quite simple, for example you can count the number
       /// of arcs in a digraph \c g of type \c %Digraph as follows:
       ///\code
Index: lemon/concepts/graph.h
===================================================================
--- lemon/concepts/graph.h	(revision 833)
+++ lemon/concepts/graph.h	(revision 781)
@@ -141,5 +141,5 @@
 
       /// This iterator goes through each node of the graph.
-      /// Its usage is quite simple, for example, you can count the number
+      /// Its usage is quite simple, for example you can count the number
       /// of nodes in a graph \c g of type \c %Graph like this:
       ///\code
@@ -229,5 +229,5 @@
 
       /// This iterator goes through each edge of the graph.
-      /// Its usage is quite simple, for example, you can count the number
+      /// Its usage is quite simple, for example you can count the number
       /// of edges in a graph \c g of type \c %Graph as follows:
       ///\code
@@ -273,5 +273,5 @@
       /// This iterator goes trough the incident undirected edges
       /// of a certain node of a graph.
-      /// Its usage is quite simple, for example, you can compute the
+      /// Its usage is quite simple, for example you can compute the
       /// degree (i.e. the number of incident edges) of a node \c n
       /// in a graph \c g of type \c %Graph as follows.
@@ -370,5 +370,5 @@
 
       /// This iterator goes through each directed arc of the graph.
-      /// Its usage is quite simple, for example, you can count the number
+      /// Its usage is quite simple, for example you can count the number
       /// of arcs in a graph \c g of type \c %Graph as follows:
       ///\code
@@ -414,5 +414,5 @@
       /// This iterator goes trough the \e outgoing directed arcs of a
       /// certain node of a graph.
-      /// Its usage is quite simple, for example, you can count the number
+      /// Its usage is quite simple, for example you can count the number
       /// of outgoing arcs of a node \c n
       /// in a graph \c g of type \c %Graph as follows.
@@ -462,5 +462,5 @@
       /// This iterator goes trough the \e incoming directed arcs of a
       /// certain node of a graph.
-      /// Its usage is quite simple, for example, you can count the number
+      /// Its usage is quite simple, for example you can count the number
       /// of incoming arcs of a node \c n
       /// in a graph \c g of type \c %Graph as follows.
@@ -588,5 +588,5 @@
       /// Returns the first node of the given edge.
       ///
-      /// Edges don't have source and target nodes, however, methods
+      /// Edges don't have source and target nodes, however methods
       /// u() and v() are used to query the two end-nodes of an edge.
       /// The orientation of an edge that arises this way is called
@@ -601,5 +601,5 @@
       /// Returns the second node of the given edge.
       ///
-      /// Edges don't have source and target nodes, however, methods
+      /// Edges don't have source and target nodes, however methods
       /// u() and v() are used to query the two end-nodes of an edge.
       /// The orientation of an edge that arises this way is called
Index: lemon/concepts/graph_components.h
===================================================================
--- lemon/concepts/graph_components.h	(revision 833)
+++ lemon/concepts/graph_components.h	(revision 781)
@@ -19,5 +19,5 @@
 ///\ingroup graph_concepts
 ///\file
-///\brief The concepts of graph components.
+///\brief The concept of graph components.
 
 #ifndef LEMON_CONCEPTS_GRAPH_COMPONENTS_H
Index: lemon/concepts/path.h
===================================================================
--- lemon/concepts/path.h	(revision 832)
+++ lemon/concepts/path.h	(revision 606)
@@ -19,5 +19,5 @@
 ///\ingroup concept
 ///\file
-///\brief The concept of paths
+///\brief Classes for representing paths in digraphs.
 ///
 
@@ -39,20 +39,11 @@
     /// A skeleton structure for representing directed paths in a
     /// digraph.
-    /// In a sense, a path can be treated as a list of arcs.
-    /// LEMON path types just store this list. As a consequence, they cannot
-    /// enumerate the nodes on the path directly and a zero length path
-    /// cannot store its source node.
-    ///
-    /// The arcs of a path should be stored in the order of their directions,
-    /// i.e. the target node of each arc should be the same as the source
-    /// node of the next arc. This consistency could be checked using
-    /// \ref checkPath().
-    /// The source and target nodes of a (consistent) path can be obtained
-    /// using \ref pathSource() and \ref pathTarget().
-    ///
-    /// A path can be constructed from another path of any type using the
-    /// copy constructor or the assignment operator.
-    ///
     /// \tparam GR The digraph type in which the path is.
+    ///
+    /// In a sense, the path can be treated as a list of arcs. The
+    /// lemon path type stores just this list. As a consequence it
+    /// cannot enumerate the nodes in the path and the zero length
+    /// paths cannot store the source.
+    ///
     template <typename GR>
     class Path {
@@ -69,9 +60,9 @@
       Path() {}
 
-      /// \brief Template copy constructor
+      /// \brief Template constructor
       template <typename CPath>
       Path(const CPath& cpath) {}
 
-      /// \brief Template assigment operator
+      /// \brief Template assigment
       template <typename CPath>
       Path& operator=(const CPath& cpath) {
@@ -80,5 +71,5 @@
       }
 
-      /// Length of the path, i.e. the number of arcs on the path.
+      /// Length of the path ie. the number of arcs in the path.
       int length() const { return 0;}
 
@@ -89,7 +80,7 @@
       void clear() {}
 
-      /// \brief LEMON style iterator for enumerating the arcs of a path.
+      /// \brief LEMON style iterator for path arcs
       ///
-      /// LEMON style iterator class for enumerating the arcs of a path.
+      /// This class is used to iterate on the arcs of the paths.
       class ArcIt {
       public:
@@ -98,8 +89,8 @@
         /// Invalid constructor
         ArcIt(Invalid) {}
-        /// Sets the iterator to the first arc of the given path
+        /// Constructor for first arc
         ArcIt(const Path &) {}
 
-        /// Conversion to \c Arc
+        /// Conversion to Arc
         operator Arc() const { return INVALID; }
 
@@ -202,16 +193,22 @@
     ///
     /// A skeleton structure for path dumpers. The path dumpers are
-    /// the generalization of the paths, they can enumerate the arcs
-    /// of the path either in forward or in backward order.
-    /// These classes are typically not used directly, they are rather
-    /// used to be assigned to a real path type.
+    /// the generalization of the paths. The path dumpers can
+    /// enumerate the arcs of the path wheter in forward or in
+    /// backward order.  In most time these classes are not used
+    /// directly rather it used to assign a dumped class to a real
+    /// path type.
     ///
     /// The main purpose of this concept is that the shortest path
-    /// algorithms can enumerate the arcs easily in reverse order.
-    /// In LEMON, such algorithms give back a (reverse) path dumper that
-    /// can be assigned to a real path. The dumpers can be implemented as
+    /// algorithms can enumerate easily the arcs in reverse order.
+    /// If we would like to give back a real path from these
+    /// algorithms then we should create a temporarly path object. In
+    /// LEMON such algorithms gives back a path dumper what can
+    /// assigned to a real path and the dumpers can be implemented as
     /// an adaptor class to the predecessor map.
     ///
     /// \tparam GR The digraph type in which the path is.
+    ///
+    /// The paths can be constructed from any path type by a
+    /// template constructor or a template assignment operator.
     template <typename GR>
     class PathDumper {
@@ -223,5 +220,5 @@
       typedef typename Digraph::Arc Arc;
 
-      /// Length of the path, i.e. the number of arcs on the path.
+      /// Length of the path ie. the number of arcs in the path.
       int length() const { return 0;}
 
@@ -231,12 +228,13 @@
       /// \brief Forward or reverse dumping
       ///
-      /// If this tag is defined to be \c True, then reverse dumping
-      /// is provided in the path dumper. In this case, \c RevArcIt
-      /// iterator should be implemented instead of \c ArcIt iterator.
+      /// If the RevPathTag is defined and true then reverse dumping
+      /// is provided in the path dumper. In this case instead of the
+      /// ArcIt the RevArcIt iterator should be implemented in the
+      /// dumper.
       typedef False RevPathTag;
 
-      /// \brief LEMON style iterator for enumerating the arcs of a path.
+      /// \brief LEMON style iterator for path arcs
       ///
-      /// LEMON style iterator class for enumerating the arcs of a path.
+      /// This class is used to iterate on the arcs of the paths.
       class ArcIt {
       public:
@@ -245,8 +243,8 @@
         /// Invalid constructor
         ArcIt(Invalid) {}
-        /// Sets the iterator to the first arc of the given path
+        /// Constructor for first arc
         ArcIt(const PathDumper&) {}
 
-        /// Conversion to \c Arc
+        /// Conversion to Arc
         operator Arc() const { return INVALID; }
 
@@ -263,9 +261,8 @@
       };
 
-      /// \brief LEMON style iterator for enumerating the arcs of a path
-      /// in reverse direction.
+      /// \brief LEMON style iterator for path arcs
       ///
-      /// LEMON style iterator class for enumerating the arcs of a path
-      /// in reverse direction.
+      /// This class is used to iterate on the arcs of the paths in
+      /// reverse direction.
       class RevArcIt {
       public:
@@ -274,8 +271,8 @@
         /// Invalid constructor
         RevArcIt(Invalid) {}
-        /// Sets the iterator to the last arc of the given path
+        /// Constructor for first arc
         RevArcIt(const PathDumper &) {}
 
-        /// Conversion to \c Arc
+        /// Conversion to Arc
         operator Arc() const { return INVALID; }
 
Index: lemon/counter.h
===================================================================
--- lemon/counter.h	(revision 833)
+++ lemon/counter.h	(revision 463)
@@ -213,5 +213,5 @@
   /// 'Do nothing' version of Counter.
 
-  /// This class can be used in the same way as \ref Counter, but it
+  /// This class can be used in the same way as \ref Counter however it
   /// does not count at all and does not print report on destruction.
   ///
Index: lemon/dfs.h
===================================================================
--- lemon/dfs.h	(revision 835)
+++ lemon/dfs.h	(revision 764)
@@ -64,5 +64,5 @@
     ///The type of the map that indicates which nodes are processed.
     ///It must conform to the \ref concepts::WriteMap "WriteMap" concept.
-    ///By default, it is a NullMap.
+    ///By default it is a NullMap.
     typedef NullMap<typename Digraph::Node,bool> ProcessedMap;
     ///Instantiates a \c ProcessedMap.
@@ -634,6 +634,10 @@
     ///Runs the algorithm to visit all nodes in the digraph.
 
-    ///This method runs the %DFS algorithm in order to visit all nodes
-    ///in the digraph.
+    ///This method runs the %DFS algorithm in order to compute the
+    ///%DFS path to each node.
+    ///
+    ///The algorithm computes
+    ///- the %DFS tree (forest),
+    ///- the distance of each node from the root(s) in the %DFS tree.
     ///
     ///\note <tt>d.run()</tt> is just a shortcut of the following code.
@@ -779,5 +783,5 @@
     ///The type of the map that indicates which nodes are processed.
     ///It must conform to the \ref concepts::WriteMap "WriteMap" concept.
-    ///By default, it is a NullMap.
+    ///By default it is a NullMap.
     typedef NullMap<typename Digraph::Node,bool> ProcessedMap;
     ///Instantiates a ProcessedMap.
@@ -973,6 +977,6 @@
     ///Runs DFS algorithm to visit all nodes in the digraph.
 
-    ///This method runs DFS algorithm in order to visit all nodes
-    ///in the digraph.
+    ///This method runs DFS algorithm in order to compute
+    ///the DFS path to each node.
     void run()
     {
@@ -1575,6 +1579,10 @@
     /// \brief Runs the algorithm to visit all nodes in the digraph.
 
-    /// This method runs the %DFS algorithm in order to visit all nodes
-    /// in the digraph.
+    /// This method runs the %DFS algorithm in order to
+    /// compute the %DFS path to each node.
+    ///
+    /// The algorithm computes
+    /// - the %DFS tree (forest),
+    /// - the distance of each node from the root(s) in the %DFS tree.
     ///
     /// \note <tt>d.run()</tt> is just a shortcut of the following code.
Index: lemon/dijkstra.h
===================================================================
--- lemon/dijkstra.h	(revision 835)
+++ lemon/dijkstra.h	(revision 764)
@@ -133,5 +133,5 @@
     ///The type of the map that indicates which nodes are processed.
     ///It must conform to the \ref concepts::WriteMap "WriteMap" concept.
-    ///By default, it is a NullMap.
+    ///By default it is a NullMap.
     typedef NullMap<typename Digraph::Node,bool> ProcessedMap;
     ///Instantiates a \c ProcessedMap.
@@ -207,5 +207,5 @@
 
     ///The type of the arc lengths.
-    typedef typename TR::Value Value;
+    typedef typename TR::LengthMap::Value Value;
     ///The type of the map that stores the arc lengths.
     typedef typename TR::LengthMap LengthMap;
@@ -427,5 +427,5 @@
     ///passed to the constructor of the cross reference and the cross
     ///reference should be passed to the constructor of the heap).
-    ///However, external heap and cross reference objects could also be
+    ///However external heap and cross reference objects could also be
     ///passed to the algorithm using the \ref heap() function before
     ///calling \ref run(Node) "run()" or \ref init().
@@ -448,5 +448,5 @@
     ///\ref named-templ-param "Named parameter" for setting
     ///\c OperationTraits type.
-    /// For more information, see \ref DijkstraDefaultOperationTraits.
+    /// For more information see \ref DijkstraDefaultOperationTraits.
     template <class T>
     struct SetOperationTraits
@@ -997,5 +997,5 @@
     ///The type of the map that indicates which nodes are processed.
     ///It must conform to the \ref concepts::WriteMap "WriteMap" concept.
-    ///By default, it is a NullMap.
+    ///By default it is a NullMap.
     typedef NullMap<typename Digraph::Node,bool> ProcessedMap;
     ///Instantiates a ProcessedMap.
Index: lemon/edge_set.h
===================================================================
--- lemon/edge_set.h	(revision 834)
+++ lemon/edge_set.h	(revision 825)
@@ -256,12 +256,11 @@
   /// all arcs incident to the given node is erased from the arc set.
   ///
-  /// This class fully conforms to the \ref concepts::Digraph
-  /// "Digraph" concept.
-  /// It provides only linear time counting for nodes and arcs.
-  ///
   /// \param GR The type of the graph which shares its node set with
   /// this class. Its interface must conform to the
   /// \ref concepts::Digraph "Digraph" or \ref concepts::Graph "Graph"
   /// concept.
+  ///
+  /// This class fully conforms to the \ref concepts::Digraph
+  /// "Digraph" concept.
   template <typename GR>
   class ListArcSet : public ArcSetExtender<ListArcSetBase<GR> > {
@@ -687,11 +686,10 @@
   /// incident to the given node is erased from the arc set.
   ///
-  /// This class fully conforms to the \ref concepts::Graph "Graph"
-  /// concept.
-  /// It provides only linear time counting for nodes, edges and arcs.
-  ///
   /// \param GR The type of the graph which shares its node set
   /// with this class. Its interface must conform to the
   /// \ref concepts::Digraph "Digraph" or \ref concepts::Graph "Graph"
+  /// concept.
+  ///
+  /// This class fully conforms to the \ref concepts::Graph "Graph"
   /// concept.
   template <typename GR>
@@ -957,12 +955,11 @@
   /// arcs. Therefore the arcs cannot be erased from the arc sets.
   ///
-  /// This class fully conforms to the \ref concepts::Digraph "Digraph"
-  /// concept.
-  /// It provides only linear time counting for nodes and arcs.
-  ///
   /// \warning If a node is erased from the underlying graph and this
   /// node is the source or target of one arc in the arc set, then
   /// the arc set is invalidated, and it cannot be used anymore. The
   /// validity can be checked with the \c valid() member function.
+  ///
+  /// This class fully conforms to the \ref concepts::Digraph
+  /// "Digraph" concept.
   template <typename GR>
   class SmartArcSet : public ArcSetExtender<SmartArcSetBase<GR> > {
@@ -1308,12 +1305,11 @@
   /// edges cannot be erased from the edge sets.
   ///
-  /// This class fully conforms to the \ref concepts::Graph "Graph"
-  /// concept.
-  /// It provides only linear time counting for nodes, edges and arcs.
-  ///
   /// \warning If a node is erased from the underlying graph and this
   /// node is incident to one edge in the edge set, then the edge set
   /// is invalidated, and it cannot be used anymore. The validity can
   /// be checked with the \c valid() member function.
+  ///
+  /// This class fully conforms to the \ref concepts::Graph
+  /// "Graph" concept.
   template <typename GR>
   class SmartEdgeSet : public EdgeSetExtender<SmartEdgeSetBase<GR> > {
Index: lemon/full_graph.h
===================================================================
--- lemon/full_graph.h	(revision 834)
+++ lemon/full_graph.h	(revision 827)
@@ -163,6 +163,4 @@
   /// only in the concept class.
   ///
-  /// This class provides constant time counting for nodes and arcs.
-  ///
   /// \note FullDigraph and FullGraph classes are very similar,
   /// but there are two differences. While this class conforms only
@@ -207,5 +205,4 @@
     /// completely static, the nodes can be indexed with integers from
     /// the range <tt>[0..nodeNum()-1]</tt>.
-    /// The index of a node is the same as its ID.
     /// \sa index()
     Node operator()(int ix) const { return Parent::operator()(ix); }
@@ -216,5 +213,4 @@
     /// completely static, the nodes can be indexed with integers from
     /// the range <tt>[0..nodeNum()-1]</tt>.
-    /// The index of a node is the same as its ID.
     /// \sa operator()()
     static int index(const Node& node) { return Parent::index(node); }
@@ -540,6 +536,4 @@
   /// only in the concept class.
   ///
-  /// This class provides constant time counting for nodes, edges and arcs.
-  ///
   /// \note FullDigraph and FullGraph classes are very similar,
   /// but there are two differences. While FullDigraph
@@ -586,5 +580,4 @@
     /// completely static, the nodes can be indexed with integers from
     /// the range <tt>[0..nodeNum()-1]</tt>.
-    /// The index of a node is the same as its ID.
     /// \sa index()
     Node operator()(int ix) const { return Parent::operator()(ix); }
@@ -595,5 +588,4 @@
     /// completely static, the nodes can be indexed with integers from
     /// the range <tt>[0..nodeNum()-1]</tt>.
-    /// The index of a node is the same as its ID.
     /// \sa operator()()
     static int index(const Node& node) { return Parent::index(node); }
Index: lemon/gomory_hu.h
===================================================================
--- lemon/gomory_hu.h	(revision 833)
+++ lemon/gomory_hu.h	(revision 760)
@@ -295,7 +295,9 @@
     /// \pre \ref run() must be called before using this function.
     template <typename CutMap>
-    Value minCutMap(const Node& s,
+    Value minCutMap(const Node& s, ///< 
                     const Node& t,
+                    ///< 
                     CutMap& cutMap
+                    ///< 
                     ) const {
       Node sn = s, tn = t;
@@ -393,5 +395,5 @@
                    /// \endcode
                    /// does not necessarily give the same set of nodes.
-                   /// However, it is ensured that
+                   /// However it is ensured that
                    /// \code
                    /// MinCutNodeIt(gomory, s, t, true);
Index: lemon/graph_to_eps.h
===================================================================
--- lemon/graph_to_eps.h	(revision 833)
+++ lemon/graph_to_eps.h	(revision 664)
@@ -143,5 +143,5 @@
   ///\param gr  Reference to the graph to be printed.
   ///\param ost Reference to the output stream.
-  ///By default, it is <tt>std::cout</tt>.
+  ///By default it is <tt>std::cout</tt>.
   ///\param pros If it is \c true, then the \c ostream referenced by \c os
   ///will be explicitly deallocated by the destructor.
@@ -513,5 +513,5 @@
   ///Turn on/off pre-scaling
 
-  ///By default, graphToEps() rescales the whole image in order to avoid
+  ///By default graphToEps() rescales the whole image in order to avoid
   ///very big or very small bounding boxes.
   ///
@@ -1115,5 +1115,5 @@
 ///\param g Reference to the graph to be printed.
 ///\param os Reference to the output stream.
-///By default, it is <tt>std::cout</tt>.
+///By default it is <tt>std::cout</tt>.
 ///
 ///This function also has a lot of
@@ -1127,5 +1127,5 @@
 ///\endcode
 ///
-///For more detailed examples, see the \ref graph_to_eps_demo.cc demo file.
+///For more detailed examples see the \ref graph_to_eps_demo.cc demo file.
 ///
 ///\warning Don't forget to put the \ref GraphToEps::run() "run()"
Index: lemon/grid_graph.h
===================================================================
--- lemon/grid_graph.h	(revision 834)
+++ lemon/grid_graph.h	(revision 782)
@@ -504,6 +504,4 @@
   /// Most of its member functions and nested classes are documented
   /// only in the concept class.
-  ///
-  /// This class provides constant time counting for nodes, edges and arcs.
   class GridGraph : public ExtendedGridGraphBase {
     typedef ExtendedGridGraphBase Parent;
Index: lemon/hypercube_graph.h
===================================================================
--- lemon/hypercube_graph.h	(revision 835)
+++ lemon/hypercube_graph.h	(revision 827)
@@ -288,5 +288,5 @@
   /// differ only on one position in the binary form.
   /// This class is completely static and it needs constant memory space.
-  /// Thus you can neither add nor delete nodes or edges, however,
+  /// Thus you can neither add nor delete nodes or edges, however 
   /// the structure can be resized using resize().
   ///
@@ -294,6 +294,4 @@
   /// Most of its member functions and nested classes are documented
   /// only in the concept class.
-  ///
-  /// This class provides constant time counting for nodes, edges and arcs.
   ///
   /// \note The type of the indices is chosen to \c int for efficiency
Index: lemon/lgf_reader.h
===================================================================
--- lemon/lgf_reader.h	(revision 833)
+++ lemon/lgf_reader.h	(revision 646)
@@ -428,5 +428,5 @@
   ///\endcode
   ///
-  /// By default, the reader uses the first section in the file of the
+  /// By default the reader uses the first section in the file of the
   /// proper type. If a section has an optional name, then it can be
   /// selected for reading by giving an optional name parameter to the
@@ -2222,5 +2222,5 @@
     /// whitespaces are trimmed from each processed string.
     ///
-    /// For example, let's see a section, which contain several
+    /// For example let's see a section, which contain several
     /// integers, which should be inserted into a vector.
     ///\code
Index: lemon/list_graph.h
===================================================================
--- lemon/list_graph.h	(revision 835)
+++ lemon/list_graph.h	(revision 788)
@@ -325,6 +325,4 @@
   ///only in the concept class.
   ///
-  ///This class provides only linear time counting for nodes and arcs.
-  ///
   ///\sa concepts::Digraph
   ///\sa ListGraph
@@ -363,9 +361,5 @@
     ///\brief Erase a node from the digraph.
     ///
-    ///This function erases the given node along with its outgoing and
-    ///incoming arcs from the digraph.
-    ///
-    ///\note All iterators referencing the removed node or the connected
-    ///arcs are invalidated, of course.
+    ///This function erases the given node from the digraph.
     void erase(Node n) { Parent::erase(n); }
 
@@ -373,7 +367,4 @@
     ///
     ///This function erases the given arc from the digraph.
-    ///
-    ///\note All iterators referencing the removed arc are invalidated,
-    ///of course.
     void erase(Arc a) { Parent::erase(a); }
 
@@ -401,5 +392,5 @@
     ///
     ///\note \c ArcIt and \c OutArcIt iterators referencing the changed
-    ///arc remain valid, but \c InArcIt iterators are invalidated.
+    ///arc remain valid, however \c InArcIt iterators are invalidated.
     ///
     ///\warning This functionality cannot be used together with the Snapshot
@@ -413,5 +404,5 @@
     ///
     ///\note \c InArcIt iterators referencing the changed arc remain
-    ///valid, but \c ArcIt and \c OutArcIt iterators are invalidated.
+    ///valid, however \c ArcIt and \c OutArcIt iterators are invalidated.
     ///
     ///\warning This functionality cannot be used together with the Snapshot
@@ -520,5 +511,4 @@
     ///This function erases all nodes and arcs from the digraph.
     ///
-    ///\note All iterators of the digraph are invalidated, of course.
     void clear() {
       Parent::clear();
@@ -560,5 +550,5 @@
     /// reversing, contracting, splitting arcs or nodes) cannot be
     /// restored. These events invalidate the snapshot.
-    /// However, the arcs and nodes that were added to the digraph after
+    /// However the arcs and nodes that were added to the digraph after
     /// making the current snapshot can be removed without invalidating it.
     class Snapshot {
@@ -1190,6 +1180,4 @@
   ///only in the concept class.
   ///
-  ///This class provides only linear time counting for nodes, edges and arcs.
-  ///
   ///\sa concepts::Graph
   ///\sa ListDigraph
@@ -1230,9 +1218,5 @@
     ///\brief Erase a node from the graph.
     ///
-    /// This function erases the given node along with its incident arcs
-    /// from the graph.
-    ///
-    /// \note All iterators referencing the removed node or the incident
-    /// edges are invalidated, of course.
+    /// This function erases the given node from the graph.
     void erase(Node n) { Parent::erase(n); }
 
@@ -1240,7 +1224,4 @@
     ///
     /// This function erases the given edge from the graph.
-    ///
-    /// \note All iterators referencing the removed edge are invalidated,
-    /// of course.
     void erase(Edge e) { Parent::erase(e); }
     /// Node validity check
@@ -1287,5 +1268,5 @@
     ///
     ///\note \c EdgeIt iterators referencing the changed edge remain
-    ///valid, but \c ArcIt iterators referencing the changed edge and
+    ///valid, however \c ArcIt iterators referencing the changed edge and
     ///all other iterators whose base node is the changed node are also
     ///invalidated.
@@ -1332,5 +1313,4 @@
     ///This function erases all nodes and arcs from the graph.
     ///
-    ///\note All iterators of the graph are invalidated, of course.
     void clear() {
       Parent::clear();
@@ -1372,5 +1352,5 @@
     /// (e.g. changing the end-nodes of edges or contracting nodes)
     /// cannot be restored. These events invalidate the snapshot.
-    /// However, the edges and nodes that were added to the graph after
+    /// However the edges and nodes that were added to the graph after
     /// making the current snapshot can be removed without invalidating it.
     class Snapshot {
Index: lemon/lp_base.h
===================================================================
--- lemon/lp_base.h	(revision 833)
+++ lemon/lp_base.h	(revision 793)
@@ -147,5 +147,5 @@
     ///Iterator for iterate over the columns of an LP problem
 
-    /// Its usage is quite simple, for example, you can count the number
+    /// Its usage is quite simple, for example you can count the number
     /// of columns in an LP \c lp:
     ///\code
@@ -242,5 +242,5 @@
     ///Iterator for iterate over the rows of an LP problem
 
-    /// Its usage is quite simple, for example, you can count the number
+    /// Its usage is quite simple, for example you can count the number
     /// of rows in an LP \c lp:
     ///\code
Index: lemon/maps.h
===================================================================
--- lemon/maps.h	(revision 833)
+++ lemon/maps.h	(revision 836)
@@ -231,8 +231,8 @@
   /// This map is essentially a wrapper for \c std::vector. It assigns
   /// values to integer keys from the range <tt>[0..size-1]</tt>.
-  /// It can be used together with some data structures, e.g.
-  /// heap types and \c UnionFind, when the used items are small
+  /// It can be used with some data structures, for example
+  /// \c UnionFind, \c BinHeap, when the used items are small
   /// integers. This map conforms to the \ref concepts::ReferenceMap
-  /// "ReferenceMap" concept. 
+  /// "ReferenceMap" concept.
   ///
   /// The simplest way of using this map is through the rangeMap()
@@ -349,7 +349,7 @@
   /// The name of this type also refers to this important usage.
   ///
-  /// Apart form that, this map can be used in many other cases since it
+  /// Apart form that this map can be used in many other cases since it
   /// is based on \c std::map, which is a general associative container.
-  /// However, keep in mind that it is usually not as efficient as other
+  /// However keep in mind that it is usually not as efficient as other
   /// maps.
   ///
@@ -1786,5 +1786,5 @@
   /// The most important usage of it is storing certain nodes or arcs
   /// that were marked \c true by an algorithm.
-  /// For example, it makes easier to store the nodes in the processing
+  /// For example it makes easier to store the nodes in the processing
   /// order of Dfs algorithm, as the following examples show.
   /// \code
@@ -1801,5 +1801,5 @@
   ///
   /// \note LoggerBoolMap is just \ref concepts::WriteMap "writable", so
-  /// it cannot be used when a readable map is needed, for example, as
+  /// it cannot be used when a readable map is needed, for example as
   /// \c ReachedMap for \c Bfs, \c Dfs and \c Dijkstra algorithms.
   ///
@@ -1923,5 +1923,5 @@
   /// Otherwise consider to use \c IterableValueMap, which is more 
   /// suitable and more efficient for such cases. It provides iterators
-  /// to traverse the items with the same associated value, but
+  /// to traverse the items with the same associated value, however
   /// it does not have \c InverseMap.
   ///
@@ -3467,5 +3467,5 @@
   /// may provide alternative ways to modify the digraph.
   /// The correct behavior of InDegMap is not guarantied if these additional
-  /// features are used. For example, the functions
+  /// features are used. For example the functions
   /// \ref ListDigraph::changeSource() "changeSource()",
   /// \ref ListDigraph::changeTarget() "changeTarget()" and
@@ -3597,5 +3597,5 @@
   /// may provide alternative ways to modify the digraph.
   /// The correct behavior of OutDegMap is not guarantied if these additional
-  /// features are used. For example, the functions
+  /// features are used. For example the functions
   /// \ref ListDigraph::changeSource() "changeSource()",
   /// \ref ListDigraph::changeTarget() "changeTarget()" and
@@ -3765,4 +3765,291 @@
   }
 
+
+  /// \brief Copy the values of a graph map to another map.
+  ///
+  /// This function copies the values of a graph map to another graph map.
+  /// \c To::Key must be equal or convertible to \c From::Key and
+  /// \c From::Value must be equal or convertible to \c To::Value.
+  ///
+  /// For example, an edge map of \c int value type can be copied to
+  /// an arc map of \c double value type in an undirected graph, but
+  /// an arc map cannot be copied to an edge map.
+  /// Note that even a \ref ConstMap can be copied to a standard graph map,
+  /// but \ref mapFill() can also be used for this purpose.
+  ///
+  /// \param gr The graph for which the maps are defined.
+  /// \param from The map from which the values have to be copied.
+  /// It must conform to the \ref concepts::ReadMap "ReadMap" concept.
+  /// \param to The map to which the values have to be copied.
+  /// It must conform to the \ref concepts::WriteMap "WriteMap" concept.
+  template <typename GR, typename From, typename To>
+  void mapCopy(const GR& gr, const From& from, To& to) {
+    typedef typename To::Key Item;
+    typedef typename ItemSetTraits<GR, Item>::ItemIt ItemIt;
+    
+    for (ItemIt it(gr); it != INVALID; ++it) {
+      to.set(it, from[it]);
+    }
+  }
+
+  /// \brief Compare two graph maps.
+  ///
+  /// This function compares the values of two graph maps. It returns 
+  /// \c true if the maps assign the same value for all items in the graph.
+  /// The \c Key type of the maps (\c Node, \c Arc or \c Edge) must be equal
+  /// and their \c Value types must be comparable using \c %operator==().
+  ///
+  /// \param gr The graph for which the maps are defined.
+  /// \param map1 The first map.
+  /// \param map2 The second map.
+  template <typename GR, typename Map1, typename Map2>
+  bool mapCompare(const GR& gr, const Map1& map1, const Map2& map2) {
+    typedef typename Map2::Key Item;
+    typedef typename ItemSetTraits<GR, Item>::ItemIt ItemIt;
+    
+    for (ItemIt it(gr); it != INVALID; ++it) {
+      if (!(map1[it] == map2[it])) return false;
+    }
+    return true;
+  }
+
+  /// \brief Return an item having minimum value of a graph map.
+  ///
+  /// This function returns an item (\c Node, \c Arc or \c Edge) having
+  /// minimum value of the given graph map.
+  /// If the item set is empty, it returns \c INVALID.
+  ///
+  /// \param gr The graph for which the map is defined.
+  /// \param map The graph map.
+  template <typename GR, typename Map>
+  typename Map::Key mapMin(const GR& gr, const Map& map) {
+    return mapMin(gr, map, std::less<typename Map::Value>());
+  }
+
+  /// \brief Return an item having minimum value of a graph map.
+  ///
+  /// This function returns an item (\c Node, \c Arc or \c Edge) having
+  /// minimum value of the given graph map.
+  /// If the item set is empty, it returns \c INVALID.
+  ///
+  /// \param gr The graph for which the map is defined.
+  /// \param map The graph map.
+  /// \param comp Comparison function object.
+  template <typename GR, typename Map, typename Comp>
+  typename Map::Key mapMin(const GR& gr, const Map& map, const Comp& comp) {
+    typedef typename Map::Key Item;
+    typedef typename Map::Value Value;
+    typedef typename ItemSetTraits<GR, Item>::ItemIt ItemIt;
+
+    ItemIt min_item(gr);
+    if (min_item == INVALID) return INVALID;
+    Value min = map[min_item];
+    for (ItemIt it(gr); it != INVALID; ++it) {
+      if (comp(map[it], min)) {
+        min = map[it];
+        min_item = it;
+      }
+    }
+    return min_item;
+  }
+
+  /// \brief Return an item having maximum value of a graph map.
+  ///
+  /// This function returns an item (\c Node, \c Arc or \c Edge) having
+  /// maximum value of the given graph map.
+  /// If the item set is empty, it returns \c INVALID.
+  ///
+  /// \param gr The graph for which the map is defined.
+  /// \param map The graph map.
+  template <typename GR, typename Map>
+  typename Map::Key mapMax(const GR& gr, const Map& map) {
+    return mapMax(gr, map, std::less<typename Map::Value>());
+  }
+
+  /// \brief Return an item having maximum value of a graph map.
+  ///
+  /// This function returns an item (\c Node, \c Arc or \c Edge) having
+  /// maximum value of the given graph map.
+  /// If the item set is empty, it returns \c INVALID.
+  ///
+  /// \param gr The graph for which the map is defined.
+  /// \param map The graph map.
+  /// \param comp Comparison function object.
+  template <typename GR, typename Map, typename Comp>
+  typename Map::Key mapMax(const GR& gr, const Map& map, const Comp& comp) {
+    typedef typename Map::Key Item;
+    typedef typename Map::Value Value;
+    typedef typename ItemSetTraits<GR, Item>::ItemIt ItemIt;
+
+    ItemIt max_item(gr);
+    if (max_item == INVALID) return INVALID;
+    Value max = map[max_item];
+    for (ItemIt it(gr); it != INVALID; ++it) {
+      if (comp(max, map[it])) {
+        max = map[it];
+        max_item = it;
+      }
+    }
+    return max_item;
+  }
+
+  /// \brief Return the minimum value of a graph map.
+  ///
+  /// This function returns the minimum value of the given graph map.
+  /// The corresponding item set of the graph must not be empty.
+  ///
+  /// \param gr The graph for which the map is defined.
+  /// \param map The graph map.
+  template <typename GR, typename Map>
+  typename Map::Value mapMinValue(const GR& gr, const Map& map) {
+    return map[mapMin(gr, map, std::less<typename Map::Value>())];
+  }
+
+  /// \brief Return the minimum value of a graph map.
+  ///
+  /// This function returns the minimum value of the given graph map.
+  /// The corresponding item set of the graph must not be empty.
+  ///
+  /// \param gr The graph for which the map is defined.
+  /// \param map The graph map.
+  /// \param comp Comparison function object.
+  template <typename GR, typename Map, typename Comp>
+  typename Map::Value
+  mapMinValue(const GR& gr, const Map& map, const Comp& comp) {
+    return map[mapMin(gr, map, comp)];
+  }
+
+  /// \brief Return the maximum value of a graph map.
+  ///
+  /// This function returns the maximum value of the given graph map.
+  /// The corresponding item set of the graph must not be empty.
+  ///
+  /// \param gr The graph for which the map is defined.
+  /// \param map The graph map.
+  template <typename GR, typename Map>
+  typename Map::Value mapMaxValue(const GR& gr, const Map& map) {
+    return map[mapMax(gr, map, std::less<typename Map::Value>())];
+  }
+
+  /// \brief Return the maximum value of a graph map.
+  ///
+  /// This function returns the maximum value of the given graph map.
+  /// The corresponding item set of the graph must not be empty.
+  ///
+  /// \param gr The graph for which the map is defined.
+  /// \param map The graph map.
+  /// \param comp Comparison function object.
+  template <typename GR, typename Map, typename Comp>
+  typename Map::Value
+  mapMaxValue(const GR& gr, const Map& map, const Comp& comp) {
+    return map[mapMax(gr, map, comp)];
+  }
+
+  /// \brief Return an item having a specified value in a graph map.
+  ///
+  /// This function returns an item (\c Node, \c Arc or \c Edge) having
+  /// the specified assigned value in the given graph map.
+  /// If no such item exists, it returns \c INVALID.
+  ///
+  /// \param gr The graph for which the map is defined.
+  /// \param map The graph map.
+  /// \param val The value that have to be found.
+  template <typename GR, typename Map>
+  typename Map::Key
+  mapFind(const GR& gr, const Map& map, const typename Map::Value& val) {
+    typedef typename Map::Key Item;
+    typedef typename ItemSetTraits<GR, Item>::ItemIt ItemIt;
+
+    for (ItemIt it(gr); it != INVALID; ++it) {
+      if (map[it] == val) return it;
+    }
+    return INVALID;
+  }
+
+  /// \brief Return an item having value for which a certain predicate is
+  /// true in a graph map.
+  ///
+  /// This function returns an item (\c Node, \c Arc or \c Edge) having
+  /// such assigned value for which the specified predicate is true
+  /// in the given graph map.
+  /// If no such item exists, it returns \c INVALID.
+  ///
+  /// \param gr The graph for which the map is defined.
+  /// \param map The graph map.
+  /// \param pred The predicate function object.
+  template <typename GR, typename Map, typename Pred>
+  typename Map::Key
+  mapFindIf(const GR& gr, const Map& map, const Pred& pred) {
+    typedef typename Map::Key Item;
+    typedef typename ItemSetTraits<GR, Item>::ItemIt ItemIt;
+
+    for (ItemIt it(gr); it != INVALID; ++it) {
+      if (pred(map[it])) return it;
+    }
+    return INVALID;
+  }
+
+  /// \brief Return the number of items having a specified value in a
+  /// graph map.
+  ///
+  /// This function returns the number of items (\c Node, \c Arc or \c Edge)
+  /// having the specified assigned value in the given graph map.
+  ///
+  /// \param gr The graph for which the map is defined.
+  /// \param map The graph map.
+  /// \param val The value that have to be counted.
+  template <typename GR, typename Map>
+  int mapCount(const GR& gr, const Map& map, const typename Map::Value& val) {
+    typedef typename Map::Key Item;
+    typedef typename ItemSetTraits<GR, Item>::ItemIt ItemIt;
+
+    int cnt = 0;
+    for (ItemIt it(gr); it != INVALID; ++it) {
+      if (map[it] == val) ++cnt;
+    }
+    return cnt;
+  }
+
+  /// \brief Return the number of items having values for which a certain
+  /// predicate is true in a graph map.
+  ///
+  /// This function returns the number of items (\c Node, \c Arc or \c Edge)
+  /// having such assigned values for which the specified predicate is true
+  /// in the given graph map.
+  ///
+  /// \param gr The graph for which the map is defined.
+  /// \param map The graph map.
+  /// \param pred The predicate function object.
+  template <typename GR, typename Map, typename Pred>
+  int mapCountIf(const GR& gr, const Map& map, const Pred& pred) {
+    typedef typename Map::Key Item;
+    typedef typename ItemSetTraits<GR, Item>::ItemIt ItemIt;
+
+    int cnt = 0;
+    for (ItemIt it(gr); it != INVALID; ++it) {
+      if (pred(map[it])) ++cnt;
+    }
+    return cnt;
+  }
+
+  /// \brief Fill a graph map with a certain value.
+  ///
+  /// This function sets the specified value for all items (\c Node,
+  /// \c Arc or \c Edge) in the given graph map.
+  ///
+  /// \param gr The graph for which the map is defined.
+  /// \param map The graph map. It must conform to the
+  /// \ref concepts::WriteMap "WriteMap" concept.
+  /// \param val The value.
+  template <typename GR, typename Map>
+  void mapFill(const GR& gr, Map& map, const typename Map::Value& val) {
+    typedef typename Map::Key Item;
+    typedef typename ItemSetTraits<GR, Item>::ItemIt ItemIt;
+
+    for (ItemIt it(gr); it != INVALID; ++it) {
+      map.set(it, val);
+    }
+  }
+
   /// @}
 }
Index: lemon/network_simplex.h
===================================================================
--- lemon/network_simplex.h	(revision 835)
+++ lemon/network_simplex.h	(revision 802)
@@ -51,5 +51,5 @@
   /// in LEMON for the minimum cost flow problem.
   /// Moreover it supports both directions of the supply/demand inequality
-  /// constraints. For more information, see \ref SupplyType.
+  /// constraints. For more information see \ref SupplyType.
   ///
   /// Most of the parameters of the problem (except for the digraph)
@@ -60,7 +60,7 @@
   /// \tparam GR The digraph type the algorithm runs on.
   /// \tparam V The value type used for flow amounts, capacity bounds
-  /// and supply values in the algorithm. By default, it is \c int.
+  /// and supply values in the algorithm. By default it is \c int.
   /// \tparam C The value type used for costs and potentials in the
-  /// algorithm. By default, it is the same as \c V.
+  /// algorithm. By default it is the same as \c V.
   ///
   /// \warning Both value types must be signed and all input data must
@@ -69,5 +69,5 @@
   /// \note %NetworkSimplex provides five different pivot rule
   /// implementations, from which the most efficient one is used
-  /// by default. For more information, see \ref PivotRule.
+  /// by default. For more information see \ref PivotRule.
   template <typename GR, typename V = int, typename C = V>
   class NetworkSimplex
@@ -125,21 +125,21 @@
     /// implementations that significantly affect the running time
     /// of the algorithm.
-    /// By default, \ref BLOCK_SEARCH "Block Search" is used, which
+    /// By default \ref BLOCK_SEARCH "Block Search" is used, which
     /// proved to be the most efficient and the most robust on various
     /// test inputs according to our benchmark tests.
-    /// However, another pivot rule can be selected using the \ref run()
+    /// However another pivot rule can be selected using the \ref run()
     /// function with the proper parameter.
     enum PivotRule {
 
-      /// The \e First \e Eligible pivot rule.
+      /// The First Eligible pivot rule.
       /// The next eligible arc is selected in a wraparound fashion
       /// in every iteration.
       FIRST_ELIGIBLE,
 
-      /// The \e Best \e Eligible pivot rule.
+      /// The Best Eligible pivot rule.
       /// The best eligible arc is selected in every iteration.
       BEST_ELIGIBLE,
 
-      /// The \e Block \e Search pivot rule.
+      /// The Block Search pivot rule.
       /// A specified number of arcs are examined in every iteration
       /// in a wraparound fashion and the best eligible arc is selected
@@ -147,5 +147,5 @@
       BLOCK_SEARCH,
 
-      /// The \e Candidate \e List pivot rule.
+      /// The Candidate List pivot rule.
       /// In a major iteration a candidate list is built from eligible arcs
       /// in a wraparound fashion and in the following minor iterations
@@ -153,5 +153,5 @@
       CANDIDATE_LIST,
 
-      /// The \e Altering \e Candidate \e List pivot rule.
+      /// The Altering Candidate List pivot rule.
       /// It is a modified version of the Candidate List method.
       /// It keeps only the several best eligible arcs from the former
@@ -813,5 +813,5 @@
     /// type will be used.
     ///
-    /// For more information, see \ref SupplyType.
+    /// For more information see \ref SupplyType.
     ///
     /// \return <tt>(*this)</tt>
@@ -845,9 +845,9 @@
     /// \ref reset() is called, thus only the modified parameters
     /// have to be set again. See \ref reset() for examples.
-    /// However, the underlying digraph must not be modified after this
+    /// However the underlying digraph must not be modified after this
     /// class have been constructed, since it copies and extends the graph.
     ///
     /// \param pivot_rule The pivot rule that will be used during the
-    /// algorithm. For more information, see \ref PivotRule.
+    /// algorithm. For more information see \ref PivotRule.
     ///
     /// \return \c INFEASIBLE if no feasible flow exists,
@@ -874,5 +874,5 @@
     /// used, all the parameters given before are kept for the next
     /// \ref run() call.
-    /// However, the underlying digraph must not be modified after this
+    /// However the underlying digraph must not be modified after this
     /// class have been constructed, since it copies and extends the graph.
     ///
Index: lemon/preflow.h
===================================================================
--- lemon/preflow.h	(revision 835)
+++ lemon/preflow.h	(revision 802)
@@ -266,5 +266,5 @@
     /// able to automatically created by the algorithm (i.e. the
     /// digraph and the maximum level should be passed to it).
-    /// However, an external elevator object could also be passed to the
+    /// However an external elevator object could also be passed to the
     /// algorithm with the \ref elevator(Elevator&) "elevator()" function
     /// before calling \ref run() or \ref init().
Index: lemon/smart_graph.h
===================================================================
--- lemon/smart_graph.h	(revision 834)
+++ lemon/smart_graph.h	(revision 827)
@@ -195,6 +195,4 @@
   ///only in the concept class.
   ///
-  ///This class provides constant time counting for nodes and arcs.
-  ///
   ///\sa concepts::Digraph
   ///\sa SmartGraph
@@ -623,6 +621,4 @@
   /// only in the concept class.
   ///
-  /// This class provides constant time counting for nodes, edges and arcs.
-  ///
   /// \sa concepts::Graph
   /// \sa SmartDigraph
Index: lemon/static_graph.h
===================================================================
--- lemon/static_graph.h	(revision 834)
+++ lemon/static_graph.h	(revision 826)
@@ -293,6 +293,4 @@
   /// only in the concept class.
   ///
-  /// This class provides constant time counting for nodes and arcs.
-  ///
   /// \sa concepts::Digraph
   class StaticDigraph : public ExtendedStaticDigraphBase {
Index: lemon/time_measure.h
===================================================================
--- lemon/time_measure.h	(revision 833)
+++ lemon/time_measure.h	(revision 631)
@@ -376,5 +376,5 @@
     ///This function returns the number of stop() exections that is
     ///necessary to really stop the timer.
-    ///For example, the timer
+    ///For example the timer
     ///is running if and only if the return value is \c true
     ///(i.e. greater than
Index: lemon/unionfind.h
===================================================================
--- lemon/unionfind.h	(revision 833)
+++ lemon/unionfind.h	(revision 606)
@@ -44,5 +44,5 @@
   /// This is a very simple but efficient implementation, providing
   /// only four methods: join (union), find, insert and size.
-  /// For more features, see the \ref UnionFindEnum class.
+  /// For more features see the \ref UnionFindEnum class.
   ///
   /// It is primarily used in Kruskal algorithm for finding minimal
Index: test/maps_test.cc
===================================================================
--- test/maps_test.cc	(revision 773)
+++ test/maps_test.cc	(revision 836)
@@ -27,4 +27,5 @@
 #include <lemon/adaptors.h>
 #include <lemon/dfs.h>
+#include <algorithm>
 
 #include "test_tools.h"
@@ -38,7 +39,20 @@
 
 class C {
-  int x;
+  int _x;
 public:
-  C(int _x) : x(_x) {}
+  C(int x) : _x(x) {}
+  int get() const { return _x; }
+};
+inline bool operator<(C c1, C c2) { return c1.get() < c2.get(); }
+inline bool operator==(C c1, C c2) { return c1.get() == c2.get(); }
+
+C createC(int x) { return C(x); }
+
+template <typename T>
+class Less {
+  T _t;
+public:
+  Less(T t): _t(t) {}
+  bool operator()(const T& t) const { return t < _t; }
 };
 
@@ -57,4 +71,12 @@
 int binc(int a, B) { return a+1; }
 
+template <typename T>
+class Sum {
+  T& _sum;
+public:
+  Sum(T& sum) : _sum(sum) {}
+  void operator()(const T& t) { _sum += t; }
+};
+
 typedef ReadMap<A, double> DoubleMap;
 typedef ReadWriteMap<A, double> DoubleWriteMap;
@@ -64,10 +86,4 @@
 typedef ReadWriteMap<A, bool> BoolWriteMap;
 typedef ReferenceMap<A, bool, bool&, const bool&> BoolRefMap;
-
-template<typename Map1, typename Map2, typename ItemIt>
-void compareMap(const Map1& map1, const Map2& map2, ItemIt it) {
-  for (; it != INVALID; ++it)
-    check(map1[it] == map2[it], "The maps are not equal");
-}
 
 int main()
@@ -495,7 +511,8 @@
     }
     
-    compareMap(sourceMap(orienter(gr, constMap<Edge, bool>(true))),
-               targetMap(orienter(gr, constMap<Edge, bool>(false))),
-               EdgeIt(gr));
+    check(mapCompare(gr,
+          sourceMap(orienter(gr, constMap<Edge, bool>(true))),
+          targetMap(orienter(gr, constMap<Edge, bool>(false)))),
+          "Wrong SourceMap or TargetMap");
 
     typedef Orienter<Graph, const ConstMap<Edge, bool> > Digraph;
@@ -801,4 +818,182 @@
 
   }
+  
+  // Graph map utilities:
+  // mapMin(), mapMax(), mapMinValue(), mapMaxValue()
+  // mapFind(), mapFindIf(), mapCount(), mapCountIf()
+  // mapCopy(), mapCompare(), mapFill()
+  {
+    DIGRAPH_TYPEDEFS(SmartDigraph);
+
+    SmartDigraph g;
+    Node n1 = g.addNode();
+    Node n2 = g.addNode();
+    Node n3 = g.addNode();
+    
+    SmartDigraph::NodeMap<int> map1(g);
+    SmartDigraph::ArcMap<char> map2(g);
+    ConstMap<Node, A> cmap1 = A();
+    ConstMap<Arc, C> cmap2 = C(0);
+    
+    map1[n1] = 10;
+    map1[n2] = 5;
+    map1[n3] = 12;
+    
+    // mapMin(), mapMax(), mapMinValue(), mapMaxValue()
+    check(mapMin(g, map1) == n2, "Wrong mapMin()");
+    check(mapMax(g, map1) == n3, "Wrong mapMax()");
+    check(mapMin(g, map1, std::greater<int>()) == n3, "Wrong mapMin()");
+    check(mapMax(g, map1, std::greater<int>()) == n2, "Wrong mapMax()");
+    check(mapMinValue(g, map1) == 5, "Wrong mapMinValue()");
+    check(mapMaxValue(g, map1) == 12, "Wrong mapMaxValue()");
+
+    check(mapMin(g, map2) == INVALID, "Wrong mapMin()");
+    check(mapMax(g, map2) == INVALID, "Wrong mapMax()");
+
+    check(mapMin(g, cmap1) != INVALID, "Wrong mapMin()");
+    check(mapMax(g, cmap2) == INVALID, "Wrong mapMax()");
+
+    Arc a1 = g.addArc(n1, n2);
+    Arc a2 = g.addArc(n1, n3);
+    Arc a3 = g.addArc(n2, n3);
+    Arc a4 = g.addArc(n3, n1);
+    
+    map2[a1] = 'b';
+    map2[a2] = 'a';
+    map2[a3] = 'b';
+    map2[a4] = 'c';
+
+    // mapMin(), mapMax(), mapMinValue(), mapMaxValue()
+    check(mapMin(g, map2) == a2, "Wrong mapMin()");
+    check(mapMax(g, map2) == a4, "Wrong mapMax()");
+    check(mapMin(g, map2, std::greater<int>()) == a4, "Wrong mapMin()");
+    check(mapMax(g, map2, std::greater<int>()) == a2, "Wrong mapMax()");
+    check(mapMinValue(g, map2, std::greater<int>()) == 'c',
+          "Wrong mapMinValue()");
+    check(mapMaxValue(g, map2, std::greater<int>()) == 'a',
+          "Wrong mapMaxValue()");
+
+    check(mapMin(g, cmap1) != INVALID, "Wrong mapMin()");
+    check(mapMax(g, cmap2) != INVALID, "Wrong mapMax()");
+    check(mapMaxValue(g, cmap2) == C(0), "Wrong mapMaxValue()");
+
+    check(mapMin(g, composeMap(functorToMap(&createC), map2)) == a2,
+          "Wrong mapMin()");
+    check(mapMax(g, composeMap(functorToMap(&createC), map2)) == a4,
+          "Wrong mapMax()");
+    check(mapMinValue(g, composeMap(functorToMap(&createC), map2)) == C('a'),
+          "Wrong mapMinValue()");
+    check(mapMaxValue(g, composeMap(functorToMap(&createC), map2)) == C('c'),
+          "Wrong mapMaxValue()");
+
+    // mapFind(), mapFindIf()
+    check(mapFind(g, map1, 5) == n2, "Wrong mapFind()");
+    check(mapFind(g, map1, 6) == INVALID, "Wrong mapFind()");
+    check(mapFind(g, map2, 'a') == a2, "Wrong mapFind()");
+    check(mapFind(g, map2, 'e') == INVALID, "Wrong mapFind()");
+    check(mapFind(g, cmap2, C(0)) == ArcIt(g), "Wrong mapFind()");
+    check(mapFind(g, cmap2, C(1)) == INVALID, "Wrong mapFind()");
+
+    check(mapFindIf(g, map1, Less<int>(7)) == n2,
+          "Wrong mapFindIf()");
+    check(mapFindIf(g, map1, Less<int>(5)) == INVALID,
+          "Wrong mapFindIf()");
+    check(mapFindIf(g, map2, Less<char>('d')) == ArcIt(g),
+          "Wrong mapFindIf()");
+    check(mapFindIf(g, map2, Less<char>('a')) == INVALID,
+          "Wrong mapFindIf()");
+
+    // mapCount(), mapCountIf()
+    check(mapCount(g, map1, 5) == 1, "Wrong mapCount()");
+    check(mapCount(g, map1, 6) == 0, "Wrong mapCount()");
+    check(mapCount(g, map2, 'a') == 1, "Wrong mapCount()");
+    check(mapCount(g, map2, 'b') == 2, "Wrong mapCount()");
+    check(mapCount(g, map2, 'e') == 0, "Wrong mapCount()");
+    check(mapCount(g, cmap2, C(0)) == 4, "Wrong mapCount()");
+    check(mapCount(g, cmap2, C(1)) == 0, "Wrong mapCount()");
+
+    check(mapCountIf(g, map1, Less<int>(11)) == 2,
+          "Wrong mapCountIf()");
+    check(mapCountIf(g, map1, Less<int>(13)) == 3,
+          "Wrong mapCountIf()");
+    check(mapCountIf(g, map1, Less<int>(5)) == 0,
+          "Wrong mapCountIf()");
+    check(mapCountIf(g, map2, Less<char>('d')) == 4,
+          "Wrong mapCountIf()");
+    check(mapCountIf(g, map2, Less<char>('c')) == 3,
+          "Wrong mapCountIf()");
+    check(mapCountIf(g, map2, Less<char>('a')) == 0,
+          "Wrong mapCountIf()");
+     
+    // MapIt, ConstMapIt
+/*
+These tests can be used after applying bugfix #330
+    typedef SmartDigraph::NodeMap<int>::MapIt MapIt;
+    typedef SmartDigraph::NodeMap<int>::ConstMapIt ConstMapIt;
+    check(*std::min_element(MapIt(map1), MapIt(INVALID)) == 5,
+          "Wrong NodeMap<>::MapIt");
+    check(*std::max_element(ConstMapIt(map1), ConstMapIt(INVALID)) == 12,
+          "Wrong NodeMap<>::MapIt");
+    
+    int sum = 0;
+    std::for_each(MapIt(map1), MapIt(INVALID), Sum<int>(sum));
+    check(sum == 27, "Wrong NodeMap<>::MapIt");
+    std::for_each(ConstMapIt(map1), ConstMapIt(INVALID), Sum<int>(sum));
+    check(sum == 54, "Wrong NodeMap<>::ConstMapIt");
+*/
+
+    // mapCopy(), mapCompare(), mapFill()
+    check(mapCompare(g, map1, map1), "Wrong mapCompare()");
+    check(mapCompare(g, cmap2, cmap2), "Wrong mapCompare()");
+    check(mapCompare(g, map1, shiftMap(map1, 0)), "Wrong mapCompare()");
+    check(mapCompare(g, map2, scaleMap(map2, 1)), "Wrong mapCompare()");
+    check(!mapCompare(g, map1, shiftMap(map1, 1)), "Wrong mapCompare()");
+
+    SmartDigraph::NodeMap<int> map3(g, 0);
+    SmartDigraph::ArcMap<char> map4(g, 'a');
+    
+    check(!mapCompare(g, map1, map3), "Wrong mapCompare()");
+    check(!mapCompare(g, map2, map4), "Wrong mapCompare()");    
+    
+    mapCopy(g, map1, map3);
+    mapCopy(g, map2, map4);
+
+    check(mapCompare(g, map1, map3), "Wrong mapCompare() or mapCopy()");
+    check(mapCompare(g, map2, map4), "Wrong mapCompare() or mapCopy()");    
+    
+    Undirector<SmartDigraph> ug(g);
+    Undirector<SmartDigraph>::EdgeMap<char> umap1(ug, 'x');
+    Undirector<SmartDigraph>::ArcMap<double> umap2(ug, 3.14);
+    
+    check(!mapCompare(g, map2, umap1), "Wrong mapCompare() or mapCopy()");
+    check(!mapCompare(g, umap1, map2), "Wrong mapCompare() or mapCopy()");
+    check(!mapCompare(ug, map2, umap1), "Wrong mapCompare() or mapCopy()");
+    check(!mapCompare(ug, umap1, map2), "Wrong mapCompare() or mapCopy()");
+    
+    mapCopy(g, map2, umap1);
+
+    check(mapCompare(g, map2, umap1), "Wrong mapCompare() or mapCopy()");
+    check(mapCompare(g, umap1, map2), "Wrong mapCompare() or mapCopy()");
+    check(mapCompare(ug, map2, umap1), "Wrong mapCompare() or mapCopy()");
+    check(mapCompare(ug, umap1, map2), "Wrong mapCompare() or mapCopy()");
+    
+    mapCopy(g, map2, umap1);
+    mapCopy(g, umap1, map2);
+    mapCopy(ug, map2, umap1);
+    mapCopy(ug, umap1, map2);
+    
+    check(!mapCompare(ug, umap1, umap2), "Wrong mapCompare() or mapCopy()");
+    mapCopy(ug, umap1, umap2);
+    check(mapCompare(ug, umap1, umap2), "Wrong mapCompare() or mapCopy()");
+    
+    check(!mapCompare(g, map1, constMap<Node>(2)), "Wrong mapCompare()");
+    mapFill(g, map1, 2);
+    check(mapCompare(g, constMap<Node>(2), map1), "Wrong mapFill()");
+
+    check(!mapCompare(g, map2, constMap<Arc>('z')), "Wrong mapCompare()");
+    mapCopy(g, constMap<Arc>('z'), map2);
+    check(mapCompare(g, constMap<Arc>('z'), map2), "Wrong mapCopy()");
+  }
+  
   return 0;
 }
