Index: lemon/Makefile.am
===================================================================
--- lemon/Makefile.am	(revision 445)
+++ lemon/Makefile.am	(revision 468)
@@ -8,8 +8,8 @@
 
 lemon_libemon_la_SOURCES = \
-	lemon/arg_parser.cc \
-	lemon/base.cc \
-	lemon/color.cc \
-	lemon/random.cc
+        lemon/arg_parser.cc \
+        lemon/base.cc \
+        lemon/color.cc \
+        lemon/random.cc
 
 #lemon_libemon_la_CXXFLAGS = $(GLPK_CFLAGS) $(CPLEX_CFLAGS) $(SOPLEX_CXXFLAGS) $(AM_CXXFLAGS)
@@ -18,22 +18,23 @@
 lemon_HEADERS += \
 	lemon/adaptors.h \
-	lemon/arg_parser.h \
+        lemon/arg_parser.h \
 	lemon/assert.h \
-	lemon/bfs.h \
-	lemon/bin_heap.h \
-	lemon/circulation.h \
-	lemon/color.h \
+        lemon/bfs.h \
+        lemon/bin_heap.h \
+        lemon/circulation.h \
+        lemon/color.h \
 	lemon/concept_check.h \
-	lemon/counter.h \
+        lemon/counter.h \
 	lemon/core.h \
-	lemon/dfs.h \
-	lemon/dijkstra.h \
-	lemon/dim2.h \
-	lemon/dimacs.h \
+        lemon/dfs.h \
+        lemon/dijkstra.h \
+        lemon/dim2.h \
+        lemon/dimacs.h \
+	lemon/edge_set.h \
 	lemon/elevator.h \
 	lemon/error.h \
 	lemon/full_graph.h \
-	lemon/graph_to_eps.h \
-	lemon/grid_graph.h \
+        lemon/graph_to_eps.h \
+        lemon/grid_graph.h \
 	lemon/hypercube_graph.h \
 	lemon/kruskal.h \
@@ -48,10 +49,9 @@
 	lemon/path.h \
 	lemon/preflow.h \
-	lemon/radix_sort.h \
-	lemon/random.h \
+        lemon/random.h \
 	lemon/smart_graph.h \
 	lemon/suurballe.h \
-	lemon/time_measure.h \
-	lemon/tolerance.h \
+        lemon/time_measure.h \
+        lemon/tolerance.h \
 	lemon/unionfind.h
 
@@ -60,7 +60,8 @@
 	lemon/bits/array_map.h \
 	lemon/bits/base_extender.h \
-	lemon/bits/bezier.h \
+        lemon/bits/bezier.h \
 	lemon/bits/default_map.h \
-	lemon/bits/enable_if.h \
+	lemon/bits/edge_set_extender.h \
+        lemon/bits/enable_if.h \
 	lemon/bits/graph_adaptor_extender.h \
 	lemon/bits/graph_extender.h \
Index: lemon/adaptors.h
===================================================================
--- lemon/adaptors.h	(revision 464)
+++ lemon/adaptors.h	(revision 416)
@@ -3,5 +3,5 @@
  * This file is a part of LEMON, a generic C++ optimization library.
  *
- * Copyright (C) 2003-2009
+ * Copyright (C) 2003-2008
  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
  * (Egervary Research Group on Combinatorial Optimization, EGRES).
@@ -22,5 +22,5 @@
 /// \ingroup graph_adaptors
 /// \file
-/// \brief Adaptor classes for digraphs and graphs
+/// \brief Several graph adaptors
 ///
 /// This file contains several useful adaptors for digraphs and graphs.
@@ -71,9 +71,9 @@
     int nodeNum() const { return _digraph->nodeNum(); }
 
-    typedef ArcNumTagIndicator<Digraph> ArcNumTag;
+    typedef EdgeNumTagIndicator<Digraph> EdgeNumTag;
     int arcNum() const { return _digraph->arcNum(); }
 
-    typedef FindArcTagIndicator<Digraph> FindArcTag;
-    Arc findArc(const Node& u, const Node& v, const Arc& prev = INVALID) const {
+    typedef FindEdgeTagIndicator<Digraph> FindEdgeTag;
+    Arc findArc(const Node& u, const Node& v, const Arc& prev = INVALID) {
       return _digraph->findArc(u, v, prev);
     }
@@ -82,8 +82,8 @@
     Arc addArc(const Node& u, const Node& v) { return _digraph->addArc(u, v); }
 
-    void erase(const Node& n) { _digraph->erase(n); }
-    void erase(const Arc& a) { _digraph->erase(a); }
-
-    void clear() { _digraph->clear(); }
+    void erase(const Node& n) const { _digraph->erase(n); }
+    void erase(const Arc& a) const { _digraph->erase(a); }
+
+    void clear() const { _digraph->clear(); }
 
     int id(const Node& n) const { return _digraph->id(n); }
@@ -199,19 +199,13 @@
     int nodeNum() const { return _graph->nodeNum(); }
 
-    typedef ArcNumTagIndicator<Graph> ArcNumTag;
+    typedef EdgeNumTagIndicator<Graph> EdgeNumTag;
     int arcNum() const { return _graph->arcNum(); }
-
-    typedef EdgeNumTagIndicator<Graph> EdgeNumTag;
     int edgeNum() const { return _graph->edgeNum(); }
 
-    typedef FindArcTagIndicator<Graph> FindArcTag;
-    Arc findArc(const Node& u, const Node& v,
-                const Arc& prev = INVALID) const {
+    typedef FindEdgeTagIndicator<Graph> FindEdgeTag;
+    Arc findArc(const Node& u, const Node& v, const Arc& prev = INVALID) {
       return _graph->findArc(u, v, prev);
     }
-
-    typedef FindEdgeTagIndicator<Graph> FindEdgeTag;
-    Edge findEdge(const Node& u, const Node& v,
-                  const Edge& prev = INVALID) const {
+    Edge findEdge(const Node& u, const Node& v, const Edge& prev = INVALID) {
       return _graph->findEdge(u, v, prev);
     }
@@ -337,7 +331,7 @@
     Arc addArc(const Node& u, const Node& v) { return Parent::addArc(v, u); }
 
-    typedef FindArcTagIndicator<Digraph> FindArcTag;
+    typedef FindEdgeTagIndicator<Digraph> FindEdgeTag;
     Arc findArc(const Node& u, const Node& v,
-                const Arc& prev = INVALID) const {
+                const Arc& prev = INVALID) {
       return Parent::findArc(v, u, prev);
     }
@@ -347,31 +341,19 @@
   /// \ingroup graph_adaptors
   ///
-  /// \brief Adaptor class for reversing the orientation of the arcs in
-  /// a digraph.
-  ///
-  /// ReverseDigraph can be used for reversing the arcs in a digraph.
-  /// It conforms to the \ref concepts::Digraph "Digraph" concept.
-  ///
-  /// The adapted digraph can also be modified through this adaptor
-  /// by adding or removing nodes or arcs, unless the \c GR template
-  /// parameter is set to be \c const.
-  ///
-  /// \tparam GR The type of the adapted digraph.
-  /// It must conform to the \ref concepts::Digraph "Digraph" concept.
-  /// It can also be specified to be \c const.
-  ///
-  /// \note The \c Node and \c Arc types of this adaptor and the adapted
-  /// digraph are convertible to each other.
-  template<typename GR>
-#ifdef DOXYGEN
-  class ReverseDigraph {
-#else
+  /// \brief A digraph adaptor which reverses the orientation of the arcs.
+  ///
+  /// ReverseDigraph reverses the arcs in the adapted digraph. The
+  /// SubDigraph is conform to the \ref concepts::Digraph
+  /// "Digraph concept".
+  ///
+  /// \tparam _Digraph It must be conform to the \ref concepts::Digraph
+  /// "Digraph concept". The type can be specified to be const.
+  template<typename _Digraph>
   class ReverseDigraph :
-    public DigraphAdaptorExtender<ReverseDigraphBase<GR> > {
-#endif
-  public:
-    /// The type of the adapted digraph.
-    typedef GR Digraph;
-    typedef DigraphAdaptorExtender<ReverseDigraphBase<GR> > Parent;
+    public DigraphAdaptorExtender<ReverseDigraphBase<_Digraph> > {
+  public:
+    typedef _Digraph Digraph;
+    typedef DigraphAdaptorExtender<
+      ReverseDigraphBase<_Digraph> > Parent;
   protected:
     ReverseDigraph() { }
@@ -380,5 +362,5 @@
     /// \brief Constructor
     ///
-    /// Creates a reverse digraph adaptor for the given digraph.
+    /// Creates a reverse digraph adaptor for the given digraph
     explicit ReverseDigraph(Digraph& digraph) {
       Parent::setDigraph(digraph);
@@ -386,14 +368,11 @@
   };
 
-  /// \brief Returns a read-only ReverseDigraph adaptor
-  ///
-  /// This function just returns a read-only \ref ReverseDigraph adaptor.
-  /// \ingroup graph_adaptors
-  /// \relates ReverseDigraph
-  template<typename GR>
-  ReverseDigraph<const GR> reverseDigraph(const GR& digraph) {
-    return ReverseDigraph<const GR>(digraph);
+  /// \brief Just gives back a reverse digraph adaptor
+  ///
+  /// Just gives back a reverse digraph adaptor
+  template<typename Digraph>
+  ReverseDigraph<const Digraph> reverseDigraph(const Digraph& digraph) {
+    return ReverseDigraph<const Digraph>(digraph);
   }
-
 
   template <typename _Digraph, typename _NodeFilterMap,
@@ -479,16 +458,19 @@
     }
 
-    void status(const Node& n, bool v) const { _node_filter->set(n, v); }
-    void status(const Arc& a, bool v) const { _arc_filter->set(a, v); }
-
-    bool status(const Node& n) const { return (*_node_filter)[n]; }
-    bool status(const Arc& a) const { return (*_arc_filter)[a]; }
+    void hide(const Node& n) const { _node_filter->set(n, false); }
+    void hide(const Arc& a) const { _arc_filter->set(a, false); }
+
+    void unHide(const Node& n) const { _node_filter->set(n, true); }
+    void unHide(const Arc& a) const { _arc_filter->set(a, true); }
+
+    bool hidden(const Node& n) const { return !(*_node_filter)[n]; }
+    bool hidden(const Arc& a) const { return !(*_arc_filter)[a]; }
 
     typedef False NodeNumTag;
-    typedef False ArcNumTag;
-
-    typedef FindArcTagIndicator<Digraph> FindArcTag;
+    typedef False EdgeNumTag;
+
+    typedef FindEdgeTagIndicator<Digraph> FindEdgeTag;
     Arc findArc(const Node& source, const Node& target,
-                const Arc& prev = INVALID) const {
+                const Arc& prev = INVALID) {
       if (!(*_node_filter)[source] || !(*_node_filter)[target]) {
         return INVALID;
@@ -619,16 +601,19 @@
     }
 
-    void status(const Node& n, bool v) const { _node_filter->set(n, v); }
-    void status(const Arc& a, bool v) const { _arc_filter->set(a, v); }
-
-    bool status(const Node& n) const { return (*_node_filter)[n]; }
-    bool status(const Arc& a) const { return (*_arc_filter)[a]; }
+    void hide(const Node& n) const { _node_filter->set(n, false); }
+    void hide(const Arc& e) const { _arc_filter->set(e, false); }
+
+    void unHide(const Node& n) const { _node_filter->set(n, true); }
+    void unHide(const Arc& e) const { _arc_filter->set(e, true); }
+
+    bool hidden(const Node& n) const { return !(*_node_filter)[n]; }
+    bool hidden(const Arc& e) const { return !(*_arc_filter)[e]; }
 
     typedef False NodeNumTag;
-    typedef False ArcNumTag;
-
-    typedef FindArcTagIndicator<Digraph> FindArcTag;
+    typedef False EdgeNumTag;
+
+    typedef FindEdgeTagIndicator<Digraph> FindEdgeTag;
     Arc findArc(const Node& source, const Node& target,
-                const Arc& prev = INVALID) const {
+                const Arc& prev = INVALID) {
       if (!(*_node_filter)[source] || !(*_node_filter)[target]) {
         return INVALID;
@@ -695,55 +680,40 @@
   /// \ingroup graph_adaptors
   ///
-  /// \brief Adaptor class for hiding nodes and arcs in a digraph
-  ///
-  /// SubDigraph can be used for hiding nodes and arcs in a digraph.
-  /// A \c bool node map and a \c bool arc map must be specified, which
-  /// define the filters for nodes and arcs.
-  /// Only the nodes and arcs with \c true filter value are
-  /// shown in the subdigraph. The arcs that are incident to hidden
-  /// nodes are also filtered out.
-  /// This adaptor conforms to the \ref concepts::Digraph "Digraph" concept.
-  ///
-  /// The adapted digraph can also be modified through this adaptor
-  /// by adding or removing nodes or arcs, unless the \c GR template
-  /// parameter is set to be \c const.
-  ///
-  /// \tparam GR The type of the adapted digraph.
-  /// It must conform to the \ref concepts::Digraph "Digraph" concept.
-  /// It can also be specified to be \c const.
-  /// \tparam NF The type of the node filter map.
-  /// It must be a \c bool (or convertible) node map of the
-  /// adapted digraph. The default type is
-  /// \ref concepts::Digraph::NodeMap "GR::NodeMap<bool>".
-  /// \tparam AF The type of the arc filter map.
-  /// It must be \c bool (or convertible) arc map of the
-  /// adapted digraph. The default type is
-  /// \ref concepts::Digraph::ArcMap "GR::ArcMap<bool>".
-  ///
-  /// \note The \c Node and \c Arc types of this adaptor and the adapted
-  /// digraph are convertible to each other.
+  /// \brief An adaptor for hiding nodes and arcs in a digraph
+  ///
+  /// SubDigraph hides nodes and arcs in a digraph. A bool node map
+  /// and a bool arc map must be specified, which define the filters
+  /// for nodes and arcs. Just the nodes and arcs with true value are
+  /// shown in the subdigraph. The SubDigraph is conform to the \ref
+  /// concepts::Digraph "Digraph concept". If the \c _checked parameter
+  /// is true, then the arcs incident to filtered nodes are also
+  /// filtered out.
+  ///
+  /// \tparam _Digraph It must be conform to the \ref
+  /// concepts::Digraph "Digraph concept". The type can be specified
+  /// to const.
+  /// \tparam _NodeFilterMap A bool valued node map of the the adapted digraph.
+  /// \tparam _ArcFilterMap A bool valued arc map of the the adapted digraph.
+  /// \tparam _checked If the parameter is false then the arc filtering
+  /// is not checked with respect to node filter. Otherwise, each arc
+  /// is automatically filtered, which is incident to a filtered node.
   ///
   /// \see FilterNodes
   /// \see FilterArcs
-#ifdef DOXYGEN
-  template<typename GR, typename NF, typename AF>
-  class SubDigraph {
-#else
-  template<typename GR,
-           typename NF = typename GR::template NodeMap<bool>,
-           typename AF = typename GR::template ArcMap<bool> >
-  class SubDigraph :
-    public DigraphAdaptorExtender<SubDigraphBase<GR, NF, AF, true> > {
-#endif
-  public:
-    /// The type of the adapted digraph.
-    typedef GR Digraph;
-    /// The type of the node filter map.
-    typedef NF NodeFilterMap;
-    /// The type of the arc filter map.
-    typedef AF ArcFilterMap;
-
-    typedef DigraphAdaptorExtender<SubDigraphBase<GR, NF, AF, true> >
-      Parent;
+  template<typename _Digraph,
+           typename _NodeFilterMap = typename _Digraph::template NodeMap<bool>,
+           typename _ArcFilterMap = typename _Digraph::template ArcMap<bool>,
+           bool _checked = true>
+  class SubDigraph
+    : public DigraphAdaptorExtender<
+      SubDigraphBase<_Digraph, _NodeFilterMap, _ArcFilterMap, _checked> > {
+  public:
+    typedef _Digraph Digraph;
+    typedef _NodeFilterMap NodeFilterMap;
+    typedef _ArcFilterMap ArcFilterMap;
+
+    typedef DigraphAdaptorExtender<
+      SubDigraphBase<Digraph, NodeFilterMap, ArcFilterMap, _checked> >
+    Parent;
 
     typedef typename Parent::Node Node;
@@ -756,6 +726,6 @@
     /// \brief Constructor
     ///
-    /// Creates a subdigraph for the given digraph with the
-    /// given node and arc filter maps.
+    /// Creates a subdigraph for the given digraph with
+    /// given node and arc map filters.
     SubDigraph(Digraph& digraph, NodeFilterMap& node_filter,
                ArcFilterMap& arc_filter) {
@@ -765,104 +735,86 @@
     }
 
-    /// \brief Sets the status of the given node
-    ///
-    /// This function sets the status of the given node.
-    /// It is done by simply setting the assigned value of \c n
-    /// to \c v in the node filter map.
-    void status(const Node& n, bool v) const { Parent::status(n, v); }
-
-    /// \brief Sets the status of the given arc
-    ///
-    /// This function sets the status of the given arc.
-    /// It is done by simply setting the assigned value of \c a
-    /// to \c v in the arc filter map.
-    void status(const Arc& a, bool v) const { Parent::status(a, v); }
-
-    /// \brief Returns the status of the given node
-    ///
-    /// This function returns the status of the given node.
-    /// It is \c true if the given node is enabled (i.e. not hidden).
-    bool status(const Node& n) const { return Parent::status(n); }
-
-    /// \brief Returns the status of the given arc
-    ///
-    /// This function returns the status of the given arc.
-    /// It is \c true if the given arc is enabled (i.e. not hidden).
-    bool status(const Arc& a) const { return Parent::status(a); }
-
-    /// \brief Disables the given node
-    ///
-    /// This function disables the given node in the subdigraph,
-    /// so the iteration jumps over it.
-    /// It is the same as \ref status() "status(n, false)".
-    void disable(const Node& n) const { Parent::status(n, false); }
-
-    /// \brief Disables the given arc
-    ///
-    /// This function disables the given arc in the subdigraph,
-    /// so the iteration jumps over it.
-    /// It is the same as \ref status() "status(a, false)".
-    void disable(const Arc& a) const { Parent::status(a, false); }
-
-    /// \brief Enables the given node
-    ///
-    /// This function enables the given node in the subdigraph.
-    /// It is the same as \ref status() "status(n, true)".
-    void enable(const Node& n) const { Parent::status(n, true); }
-
-    /// \brief Enables the given arc
-    ///
-    /// This function enables the given arc in the subdigraph.
-    /// It is the same as \ref status() "status(a, true)".
-    void enable(const Arc& a) const { Parent::status(a, true); }
+    /// \brief Hides the node of the graph
+    ///
+    /// This function hides \c n in the digraph, i.e. the iteration
+    /// jumps over it. This is done by simply setting the value of \c n
+    /// to be false in the corresponding node-map.
+    void hide(const Node& n) const { Parent::hide(n); }
+
+    /// \brief Hides the arc of the graph
+    ///
+    /// This function hides \c a in the digraph, i.e. the iteration
+    /// jumps over it. This is done by simply setting the value of \c a
+    /// to be false in the corresponding arc-map.
+    void hide(const Arc& a) const { Parent::hide(a); }
+
+    /// \brief Unhides the node of the graph
+    ///
+    /// The value of \c n is set to be true in the node-map which stores
+    /// hide information. If \c n was hidden previuosly, then it is shown
+    /// again
+    void unHide(const Node& n) const { Parent::unHide(n); }
+
+    /// \brief Unhides the arc of the graph
+    ///
+    /// The value of \c a is set to be true in the arc-map which stores
+    /// hide information. If \c a was hidden previuosly, then it is shown
+    /// again
+    void unHide(const Arc& a) const { Parent::unHide(a); }
+
+    /// \brief Returns true if \c n is hidden.
+    ///
+    /// Returns true if \c n is hidden.
+    ///
+    bool hidden(const Node& n) const { return Parent::hidden(n); }
+
+    /// \brief Returns true if \c a is hidden.
+    ///
+    /// Returns true if \c a is hidden.
+    ///
+    bool hidden(const Arc& a) const { return Parent::hidden(a); }
 
   };
 
-  /// \brief Returns a read-only SubDigraph adaptor
-  ///
-  /// This function just returns a read-only \ref SubDigraph adaptor.
-  /// \ingroup graph_adaptors
-  /// \relates SubDigraph
-  template<typename GR, typename NF, typename AF>
-  SubDigraph<const GR, NF, AF>
-  subDigraph(const GR& digraph,
-             NF& node_filter_map, AF& arc_filter_map) {
-    return SubDigraph<const GR, NF, AF>
-      (digraph, node_filter_map, arc_filter_map);
+  /// \brief Just gives back a subdigraph
+  ///
+  /// Just gives back a subdigraph
+  template<typename Digraph, typename NodeFilterMap, typename ArcFilterMap>
+  SubDigraph<const Digraph, NodeFilterMap, ArcFilterMap>
+  subDigraph(const Digraph& digraph, NodeFilterMap& nfm, ArcFilterMap& afm) {
+    return SubDigraph<const Digraph, NodeFilterMap, ArcFilterMap>
+      (digraph, nfm, afm);
   }
 
-  template<typename GR, typename NF, typename AF>
-  SubDigraph<const GR, const NF, AF>
-  subDigraph(const GR& digraph,
-             const NF& node_filter_map, AF& arc_filter_map) {
-    return SubDigraph<const GR, const NF, AF>
-      (digraph, node_filter_map, arc_filter_map);
+  template<typename Digraph, typename NodeFilterMap, typename ArcFilterMap>
+  SubDigraph<const Digraph, const NodeFilterMap, ArcFilterMap>
+  subDigraph(const Digraph& digraph,
+             const NodeFilterMap& nfm, ArcFilterMap& afm) {
+    return SubDigraph<const Digraph, const NodeFilterMap, ArcFilterMap>
+      (digraph, nfm, afm);
   }
 
-  template<typename GR, typename NF, typename AF>
-  SubDigraph<const GR, NF, const AF>
-  subDigraph(const GR& digraph,
-             NF& node_filter_map, const AF& arc_filter_map) {
-    return SubDigraph<const GR, NF, const AF>
-      (digraph, node_filter_map, arc_filter_map);
+  template<typename Digraph, typename NodeFilterMap, typename ArcFilterMap>
+  SubDigraph<const Digraph, NodeFilterMap, const ArcFilterMap>
+  subDigraph(const Digraph& digraph,
+             NodeFilterMap& nfm, const ArcFilterMap& afm) {
+    return SubDigraph<const Digraph, NodeFilterMap, const ArcFilterMap>
+      (digraph, nfm, afm);
   }
 
-  template<typename GR, typename NF, typename AF>
-  SubDigraph<const GR, const NF, const AF>
-  subDigraph(const GR& digraph,
-             const NF& node_filter_map, const AF& arc_filter_map) {
-    return SubDigraph<const GR, const NF, const AF>
-      (digraph, node_filter_map, arc_filter_map);
+  template<typename Digraph, typename NodeFilterMap, typename ArcFilterMap>
+  SubDigraph<const Digraph, const NodeFilterMap, const ArcFilterMap>
+  subDigraph(const Digraph& digraph,
+             const NodeFilterMap& nfm, const ArcFilterMap& afm) {
+    return SubDigraph<const Digraph, const NodeFilterMap,
+      const ArcFilterMap>(digraph, nfm, afm);
   }
 
 
-  template <typename _Graph, typename _NodeFilterMap,
-            typename _EdgeFilterMap, bool _checked = true>
+  template <typename _Graph, typename NodeFilterMap,
+            typename EdgeFilterMap, bool _checked = true>
   class SubGraphBase : public GraphAdaptorBase<_Graph> {
   public:
     typedef _Graph Graph;
-    typedef _NodeFilterMap NodeFilterMap;
-    typedef _EdgeFilterMap EdgeFilterMap;
-
     typedef SubGraphBase Adaptor;
     typedef GraphAdaptorBase<_Graph> Parent;
@@ -974,17 +926,19 @@
     }
 
-    void status(const Node& n, bool v) const { _node_filter_map->set(n, v); }
-    void status(const Edge& e, bool v) const { _edge_filter_map->set(e, v); }
-
-    bool status(const Node& n) const { return (*_node_filter_map)[n]; }
-    bool status(const Edge& e) const { return (*_edge_filter_map)[e]; }
+    void hide(const Node& n) const { _node_filter_map->set(n, false); }
+    void hide(const Edge& e) const { _edge_filter_map->set(e, false); }
+
+    void unHide(const Node& n) const { _node_filter_map->set(n, true); }
+    void unHide(const Edge& e) const { _edge_filter_map->set(e, true); }
+
+    bool hidden(const Node& n) const { return !(*_node_filter_map)[n]; }
+    bool hidden(const Edge& e) const { return !(*_edge_filter_map)[e]; }
 
     typedef False NodeNumTag;
-    typedef False ArcNumTag;
     typedef False EdgeNumTag;
 
-    typedef FindArcTagIndicator<Graph> FindArcTag;
+    typedef FindEdgeTagIndicator<Graph> FindEdgeTag;
     Arc findArc(const Node& u, const Node& v,
-                const Arc& prev = INVALID) const {
+                const Arc& prev = INVALID) {
       if (!(*_node_filter_map)[u] || !(*_node_filter_map)[v]) {
         return INVALID;
@@ -996,8 +950,6 @@
       return arc;
     }
-
-    typedef FindEdgeTagIndicator<Graph> FindEdgeTag;
     Edge findEdge(const Node& u, const Node& v,
-                  const Edge& prev = INVALID) const {
+                  const Edge& prev = INVALID) {
       if (!(*_node_filter_map)[u] || !(*_node_filter_map)[v]) {
         return INVALID;
@@ -1088,12 +1040,9 @@
   };
 
-  template <typename _Graph, typename _NodeFilterMap, typename _EdgeFilterMap>
-  class SubGraphBase<_Graph, _NodeFilterMap, _EdgeFilterMap, false>
+  template <typename _Graph, typename NodeFilterMap, typename EdgeFilterMap>
+  class SubGraphBase<_Graph, NodeFilterMap, EdgeFilterMap, false>
     : public GraphAdaptorBase<_Graph> {
   public:
     typedef _Graph Graph;
-    typedef _NodeFilterMap NodeFilterMap;
-    typedef _EdgeFilterMap EdgeFilterMap;
-
     typedef SubGraphBase Adaptor;
     typedef GraphAdaptorBase<_Graph> Parent;
@@ -1173,17 +1122,19 @@
     }
 
-    void status(const Node& n, bool v) const { _node_filter_map->set(n, v); }
-    void status(const Edge& e, bool v) const { _edge_filter_map->set(e, v); }
-
-    bool status(const Node& n) const { return (*_node_filter_map)[n]; }
-    bool status(const Edge& e) const { return (*_edge_filter_map)[e]; }
+    void hide(const Node& n) const { _node_filter_map->set(n, false); }
+    void hide(const Edge& e) const { _edge_filter_map->set(e, false); }
+
+    void unHide(const Node& n) const { _node_filter_map->set(n, true); }
+    void unHide(const Edge& e) const { _edge_filter_map->set(e, true); }
+
+    bool hidden(const Node& n) const { return !(*_node_filter_map)[n]; }
+    bool hidden(const Edge& e) const { return !(*_edge_filter_map)[e]; }
 
     typedef False NodeNumTag;
-    typedef False ArcNumTag;
     typedef False EdgeNumTag;
 
-    typedef FindArcTagIndicator<Graph> FindArcTag;
+    typedef FindEdgeTagIndicator<Graph> FindEdgeTag;
     Arc findArc(const Node& u, const Node& v,
-                const Arc& prev = INVALID) const {
+                const Arc& prev = INVALID) {
       Arc arc = Parent::findArc(u, v, prev);
       while (arc != INVALID && !(*_edge_filter_map)[arc]) {
@@ -1192,8 +1143,6 @@
       return arc;
     }
-
-    typedef FindEdgeTagIndicator<Graph> FindEdgeTag;
     Edge findEdge(const Node& u, const Node& v,
-                  const Edge& prev = INVALID) const {
+                  const Edge& prev = INVALID) {
       Edge edge = Parent::findEdge(u, v, prev);
       while (edge != INVALID && !(*_edge_filter_map)[edge]) {
@@ -1283,56 +1232,35 @@
   /// \ingroup graph_adaptors
   ///
-  /// \brief Adaptor class for hiding nodes and edges in an undirected
-  /// graph.
-  ///
-  /// SubGraph can be used for hiding nodes and edges in a graph.
-  /// A \c bool node map and a \c bool edge map must be specified, which
-  /// define the filters for nodes and edges.
-  /// Only the nodes and edges with \c true filter value are
-  /// shown in the subgraph. The edges that are incident to hidden
-  /// nodes are also filtered out.
-  /// This adaptor conforms to the \ref concepts::Graph "Graph" concept.
-  ///
-  /// The adapted graph can also be modified through this adaptor
-  /// by adding or removing nodes or edges, unless the \c GR template
-  /// parameter is set to be \c const.
-  ///
-  /// \tparam GR The type of the adapted graph.
-  /// It must conform to the \ref concepts::Graph "Graph" concept.
-  /// It can also be specified to be \c const.
-  /// \tparam NF The type of the node filter map.
-  /// It must be a \c bool (or convertible) node map of the
-  /// adapted graph. The default type is
-  /// \ref concepts::Graph::NodeMap "GR::NodeMap<bool>".
-  /// \tparam EF The type of the edge filter map.
-  /// It must be a \c bool (or convertible) edge map of the
-  /// adapted graph. The default type is
-  /// \ref concepts::Graph::EdgeMap "GR::EdgeMap<bool>".
-  ///
-  /// \note The \c Node, \c Edge and \c Arc types of this adaptor and the
-  /// adapted graph are convertible to each other.
+  /// \brief A graph adaptor for hiding nodes and edges in an
+  /// undirected graph.
+  ///
+  /// SubGraph hides nodes and edges in a graph. A bool node map and a
+  /// bool edge map must be specified, which define the filters for
+  /// nodes and edges. Just the nodes and edges with true value are
+  /// shown in the subgraph. The SubGraph is conform to the \ref
+  /// concepts::Graph "Graph concept". If the \c _checked parameter is
+  /// true, then the edges incident to filtered nodes are also
+  /// filtered out.
+  ///
+  /// \tparam _Graph It must be conform to the \ref
+  /// concepts::Graph "Graph concept". The type can be specified
+  /// to const.
+  /// \tparam _NodeFilterMap A bool valued node map of the the adapted graph.
+  /// \tparam _EdgeFilterMap A bool valued edge map of the the adapted graph.
+  /// \tparam _checked If the parameter is false then the edge filtering
+  /// is not checked with respect to node filter. Otherwise, each edge
+  /// is automatically filtered, which is incident to a filtered node.
   ///
   /// \see FilterNodes
   /// \see FilterEdges
-#ifdef DOXYGEN
-  template<typename GR, typename NF, typename EF>
-  class SubGraph {
-#else
-  template<typename GR,
-           typename NF = typename GR::template NodeMap<bool>,
-           typename EF = typename GR::template EdgeMap<bool> >
-  class SubGraph :
-    public GraphAdaptorExtender<SubGraphBase<GR, NF, EF, true> > {
-#endif
-  public:
-    /// The type of the adapted graph.
-    typedef GR Graph;
-    /// The type of the node filter map.
-    typedef NF NodeFilterMap;
-    /// The type of the edge filter map.
-    typedef EF EdgeFilterMap;
-
-    typedef GraphAdaptorExtender< SubGraphBase<GR, NF, EF, true> >
-      Parent;
+  template<typename _Graph, typename NodeFilterMap,
+           typename EdgeFilterMap, bool _checked = true>
+  class SubGraph
+    : public GraphAdaptorExtender<
+      SubGraphBase<_Graph, NodeFilterMap, EdgeFilterMap, _checked> > {
+  public:
+    typedef _Graph Graph;
+    typedef GraphAdaptorExtender<
+      SubGraphBase<_Graph, NodeFilterMap, EdgeFilterMap> > Parent;
 
     typedef typename Parent::Node Node;
@@ -1345,151 +1273,130 @@
     /// \brief Constructor
     ///
-    /// Creates a subgraph for the given graph with the given node
-    /// and edge filter maps.
-    SubGraph(Graph& graph, NodeFilterMap& node_filter_map,
+    /// Creates a subgraph for the given graph with given node and
+    /// edge map filters.
+    SubGraph(Graph& _graph, NodeFilterMap& node_filter_map,
              EdgeFilterMap& edge_filter_map) {
-      setGraph(graph);
+      setGraph(_graph);
       setNodeFilterMap(node_filter_map);
       setEdgeFilterMap(edge_filter_map);
     }
 
-    /// \brief Sets the status of the given node
-    ///
-    /// This function sets the status of the given node.
-    /// It is done by simply setting the assigned value of \c n
-    /// to \c v in the node filter map.
-    void status(const Node& n, bool v) const { Parent::status(n, v); }
-
-    /// \brief Sets the status of the given edge
-    ///
-    /// This function sets the status of the given edge.
-    /// It is done by simply setting the assigned value of \c e
-    /// to \c v in the edge filter map.
-    void status(const Edge& e, bool v) const { Parent::status(e, v); }
-
-    /// \brief Returns the status of the given node
-    ///
-    /// This function returns the status of the given node.
-    /// It is \c true if the given node is enabled (i.e. not hidden).
-    bool status(const Node& n) const { return Parent::status(n); }
-
-    /// \brief Returns the status of the given edge
-    ///
-    /// This function returns the status of the given edge.
-    /// It is \c true if the given edge is enabled (i.e. not hidden).
-    bool status(const Edge& e) const { return Parent::status(e); }
-
-    /// \brief Disables the given node
-    ///
-    /// This function disables the given node in the subdigraph,
-    /// so the iteration jumps over it.
-    /// It is the same as \ref status() "status(n, false)".
-    void disable(const Node& n) const { Parent::status(n, false); }
-
-    /// \brief Disables the given edge
-    ///
-    /// This function disables the given edge in the subgraph,
-    /// so the iteration jumps over it.
-    /// It is the same as \ref status() "status(e, false)".
-    void disable(const Edge& e) const { Parent::status(e, false); }
-
-    /// \brief Enables the given node
-    ///
-    /// This function enables the given node in the subdigraph.
-    /// It is the same as \ref status() "status(n, true)".
-    void enable(const Node& n) const { Parent::status(n, true); }
-
-    /// \brief Enables the given edge
-    ///
-    /// This function enables the given edge in the subgraph.
-    /// It is the same as \ref status() "status(e, true)".
-    void enable(const Edge& e) const { Parent::status(e, true); }
-
+    /// \brief Hides the node of the graph
+    ///
+    /// This function hides \c n in the graph, i.e. the iteration
+    /// jumps over it. This is done by simply setting the value of \c n
+    /// to be false in the corresponding node-map.
+    void hide(const Node& n) const { Parent::hide(n); }
+
+    /// \brief Hides the edge of the graph
+    ///
+    /// This function hides \c e in the graph, i.e. the iteration
+    /// jumps over it. This is done by simply setting the value of \c e
+    /// to be false in the corresponding edge-map.
+    void hide(const Edge& e) const { Parent::hide(e); }
+
+    /// \brief Unhides the node of the graph
+    ///
+    /// The value of \c n is set to be true in the node-map which stores
+    /// hide information. If \c n was hidden previuosly, then it is shown
+    /// again
+    void unHide(const Node& n) const { Parent::unHide(n); }
+
+    /// \brief Unhides the edge of the graph
+    ///
+    /// The value of \c e is set to be true in the edge-map which stores
+    /// hide information. If \c e was hidden previuosly, then it is shown
+    /// again
+    void unHide(const Edge& e) const { Parent::unHide(e); }
+
+    /// \brief Returns true if \c n is hidden.
+    ///
+    /// Returns true if \c n is hidden.
+    ///
+    bool hidden(const Node& n) const { return Parent::hidden(n); }
+
+    /// \brief Returns true if \c e is hidden.
+    ///
+    /// Returns true if \c e is hidden.
+    ///
+    bool hidden(const Edge& e) const { return Parent::hidden(e); }
   };
 
-  /// \brief Returns a read-only SubGraph adaptor
-  ///
-  /// This function just returns a read-only \ref SubGraph adaptor.
+  /// \brief Just gives back a subgraph
+  ///
+  /// Just gives back a subgraph
+  template<typename Graph, typename NodeFilterMap, typename ArcFilterMap>
+  SubGraph<const Graph, NodeFilterMap, ArcFilterMap>
+  subGraph(const Graph& graph, NodeFilterMap& nfm, ArcFilterMap& efm) {
+    return SubGraph<const Graph, NodeFilterMap, ArcFilterMap>(graph, nfm, efm);
+  }
+
+  template<typename Graph, typename NodeFilterMap, typename ArcFilterMap>
+  SubGraph<const Graph, const NodeFilterMap, ArcFilterMap>
+  subGraph(const Graph& graph,
+           const NodeFilterMap& nfm, ArcFilterMap& efm) {
+    return SubGraph<const Graph, const NodeFilterMap, ArcFilterMap>
+      (graph, nfm, efm);
+  }
+
+  template<typename Graph, typename NodeFilterMap, typename ArcFilterMap>
+  SubGraph<const Graph, NodeFilterMap, const ArcFilterMap>
+  subGraph(const Graph& graph,
+           NodeFilterMap& nfm, const ArcFilterMap& efm) {
+    return SubGraph<const Graph, NodeFilterMap, const ArcFilterMap>
+      (graph, nfm, efm);
+  }
+
+  template<typename Graph, typename NodeFilterMap, typename ArcFilterMap>
+  SubGraph<const Graph, const NodeFilterMap, const ArcFilterMap>
+  subGraph(const Graph& graph,
+           const NodeFilterMap& nfm, const ArcFilterMap& efm) {
+    return SubGraph<const Graph, const NodeFilterMap, const ArcFilterMap>
+      (graph, nfm, efm);
+  }
+
   /// \ingroup graph_adaptors
-  /// \relates SubGraph
-  template<typename GR, typename NF, typename EF>
-  SubGraph<const GR, NF, EF>
-  subGraph(const GR& graph,
-           NF& node_filter_map, EF& edge_filter_map) {
-    return SubGraph<const GR, NF, EF>
-      (graph, node_filter_map, edge_filter_map);
-  }
-
-  template<typename GR, typename NF, typename EF>
-  SubGraph<const GR, const NF, EF>
-  subGraph(const GR& graph,
-           const NF& node_filter_map, EF& edge_filter_map) {
-    return SubGraph<const GR, const NF, EF>
-      (graph, node_filter_map, edge_filter_map);
-  }
-
-  template<typename GR, typename NF, typename EF>
-  SubGraph<const GR, NF, const EF>
-  subGraph(const GR& graph,
-           NF& node_filter_map, const EF& edge_filter_map) {
-    return SubGraph<const GR, NF, const EF>
-      (graph, node_filter_map, edge_filter_map);
-  }
-
-  template<typename GR, typename NF, typename EF>
-  SubGraph<const GR, const NF, const EF>
-  subGraph(const GR& graph,
-           const NF& node_filter_map, const EF& edge_filter_map) {
-    return SubGraph<const GR, const NF, const EF>
-      (graph, node_filter_map, edge_filter_map);
-  }
-
-
-  /// \ingroup graph_adaptors
-  ///
-  /// \brief Adaptor class for hiding nodes in a digraph or a graph.
-  ///
-  /// FilterNodes adaptor can be used for hiding nodes in a digraph or a
-  /// graph. A \c bool node map must be specified, which defines the filter
-  /// for the nodes. Only the nodes with \c true filter value and the
-  /// arcs/edges incident to nodes both with \c true filter value are shown
-  /// in the subgraph. This adaptor conforms to the \ref concepts::Digraph
-  /// "Digraph" concept or the \ref concepts::Graph "Graph" concept
-  /// depending on the \c GR template parameter.
-  ///
-  /// The adapted (di)graph can also be modified through this adaptor
-  /// by adding or removing nodes or arcs/edges, unless the \c GR template
-  /// parameter is set to be \c const.
-  ///
-  /// \tparam GR The type of the adapted digraph or graph.
-  /// It must conform to the \ref concepts::Digraph "Digraph" concept
-  /// or the \ref concepts::Graph "Graph" concept.
-  /// It can also be specified to be \c const.
-  /// \tparam NF The type of the node filter map.
-  /// It must be a \c bool (or convertible) node map of the
-  /// adapted (di)graph. The default type is
-  /// \ref concepts::Graph::NodeMap "GR::NodeMap<bool>".
-  ///
-  /// \note The \c Node and <tt>Arc/Edge</tt> types of this adaptor and the
-  /// adapted (di)graph are convertible to each other.
+  ///
+  /// \brief An adaptor for hiding nodes from a digraph or a graph.
+  ///
+  /// FilterNodes adaptor hides nodes in a graph or a digraph. A bool
+  /// node map must be specified, which defines the filters for
+  /// nodes. Just the unfiltered nodes and the arcs or edges incident
+  /// to unfiltered nodes are shown in the subdigraph or subgraph. The
+  /// FilterNodes is conform to the \ref concepts::Digraph
+  /// "Digraph concept" or \ref concepts::Graph "Graph concept" depending
+  /// on the \c _Digraph template parameter. If the \c _checked
+  /// parameter is true, then the arc or edges incident to filtered nodes
+  /// are also filtered out.
+  ///
+  /// \tparam _Digraph It must be conform to the \ref
+  /// concepts::Digraph "Digraph concept" or \ref concepts::Graph
+  /// "Graph concept". The type can be specified to be const.
+  /// \tparam _NodeFilterMap A bool valued node map of the the adapted graph.
+  /// \tparam _checked If the parameter is false then the arc or edge
+  /// filtering is not checked with respect to node filter. In this
+  /// case just isolated nodes can be filtered out from the
+  /// graph.
 #ifdef DOXYGEN
-  template<typename GR, typename NF>
-  class FilterNodes {
+  template<typename _Digraph,
+           typename _NodeFilterMap = typename _Digraph::template NodeMap<bool>,
+           bool _checked = true>
 #else
-  template<typename GR,
-           typename NF = typename GR::template NodeMap<bool>,
+  template<typename _Digraph,
+           typename _NodeFilterMap = typename _Digraph::template NodeMap<bool>,
+           bool _checked = true,
            typename Enable = void>
-  class FilterNodes :
-    public DigraphAdaptorExtender<
-      SubDigraphBase<GR, NF, ConstMap<typename GR::Arc, bool>, true> > {
 #endif
-  public:
-
-    typedef GR Digraph;
-    typedef NF NodeFilterMap;
-
-    typedef DigraphAdaptorExtender<
-      SubDigraphBase<GR, NF, ConstMap<typename GR::Arc, bool>, true> >
-      Parent;
+  class FilterNodes
+    : public SubDigraph<_Digraph, _NodeFilterMap,
+                        ConstMap<typename _Digraph::Arc, bool>, _checked> {
+  public:
+
+    typedef _Digraph Digraph;
+    typedef _NodeFilterMap NodeFilterMap;
+
+    typedef SubDigraph<Digraph, NodeFilterMap,
+                       ConstMap<typename Digraph::Arc, bool>, _checked>
+    Parent;
 
     typedef typename Parent::Node Node;
@@ -1506,54 +1413,45 @@
     /// \brief Constructor
     ///
-    /// Creates a subgraph for the given digraph or graph with the
+    /// Creates an adaptor for the given digraph or graph with
     /// given node filter map.
-    FilterNodes(GR& graph, NodeFilterMap& node_filter) :
-      Parent(), const_true_map(true)
-    {
-      Parent::setDigraph(graph);
+    FilterNodes(Digraph& _digraph, NodeFilterMap& node_filter) :
+      Parent(), const_true_map(true) {
+      Parent::setDigraph(_digraph);
       Parent::setNodeFilterMap(node_filter);
       Parent::setArcFilterMap(const_true_map);
     }
 
-    /// \brief Sets the status of the given node
-    ///
-    /// This function sets the status of the given node.
-    /// It is done by simply setting the assigned value of \c n
-    /// to \c v in the node filter map.
-    void status(const Node& n, bool v) const { Parent::status(n, v); }
-
-    /// \brief Returns the status of the given node
-    ///
-    /// This function returns the status of the given node.
-    /// It is \c true if the given node is enabled (i.e. not hidden).
-    bool status(const Node& n) const { return Parent::status(n); }
-
-    /// \brief Disables the given node
-    ///
-    /// This function disables the given node, so the iteration
-    /// jumps over it.
-    /// It is the same as \ref status() "status(n, false)".
-    void disable(const Node& n) const { Parent::status(n, false); }
-
-    /// \brief Enables the given node
-    ///
-    /// This function enables the given node.
-    /// It is the same as \ref status() "status(n, true)".
-    void enable(const Node& n) const { Parent::status(n, true); }
+    /// \brief Hides the node of the graph
+    ///
+    /// This function hides \c n in the digraph or graph, i.e. the iteration
+    /// jumps over it. This is done by simply setting the value of \c n
+    /// to be false in the corresponding node map.
+    void hide(const Node& n) const { Parent::hide(n); }
+
+    /// \brief Unhides the node of the graph
+    ///
+    /// The value of \c n is set to be true in the node-map which stores
+    /// hide information. If \c n was hidden previuosly, then it is shown
+    /// again
+    void unHide(const Node& n) const { Parent::unHide(n); }
+
+    /// \brief Returns true if \c n is hidden.
+    ///
+    /// Returns true if \c n is hidden.
+    ///
+    bool hidden(const Node& n) const { return Parent::hidden(n); }
 
   };
 
-  template<typename GR, typename NF>
-  class FilterNodes<GR, NF,
-                    typename enable_if<UndirectedTagIndicator<GR> >::type> :
-    public GraphAdaptorExtender<
-      SubGraphBase<GR, NF, ConstMap<typename GR::Edge, bool>, true> > {
-
-  public:
-    typedef GR Graph;
-    typedef NF NodeFilterMap;
-    typedef GraphAdaptorExtender<
-      SubGraphBase<GR, NF, ConstMap<typename GR::Edge, bool>, true> >
-      Parent;
+  template<typename _Graph, typename _NodeFilterMap, bool _checked>
+  class FilterNodes<_Graph, _NodeFilterMap, _checked,
+                    typename enable_if<UndirectedTagIndicator<_Graph> >::type>
+    : public SubGraph<_Graph, _NodeFilterMap,
+                      ConstMap<typename _Graph::Edge, bool>, _checked> {
+  public:
+    typedef _Graph Graph;
+    typedef _NodeFilterMap NodeFilterMap;
+    typedef SubGraph<Graph, NodeFilterMap,
+                     ConstMap<typename Graph::Edge, bool> > Parent;
 
     typedef typename Parent::Node Node;
@@ -1574,73 +1472,49 @@
     }
 
-    void status(const Node& n, bool v) const { Parent::status(n, v); }
-    bool status(const Node& n) const { return Parent::status(n); }
-    void disable(const Node& n) const { Parent::status(n, false); }
-    void enable(const Node& n) const { Parent::status(n, true); }
+    void hide(const Node& n) const { Parent::hide(n); }
+    void unHide(const Node& n) const { Parent::unHide(n); }
+    bool hidden(const Node& n) const { return Parent::hidden(n); }
 
   };
 
 
-  /// \brief Returns a read-only FilterNodes adaptor
-  ///
-  /// This function just returns a read-only \ref FilterNodes adaptor.
+  /// \brief Just gives back a FilterNodes adaptor
+  ///
+  /// Just gives back a FilterNodes adaptor
+  template<typename Digraph, typename NodeFilterMap>
+  FilterNodes<const Digraph, NodeFilterMap>
+  filterNodes(const Digraph& digraph, NodeFilterMap& nfm) {
+    return FilterNodes<const Digraph, NodeFilterMap>(digraph, nfm);
+  }
+
+  template<typename Digraph, typename NodeFilterMap>
+  FilterNodes<const Digraph, const NodeFilterMap>
+  filterNodes(const Digraph& digraph, const NodeFilterMap& nfm) {
+    return FilterNodes<const Digraph, const NodeFilterMap>(digraph, nfm);
+  }
+
   /// \ingroup graph_adaptors
-  /// \relates FilterNodes
-  template<typename GR, typename NF>
-  FilterNodes<const GR, NF>
-  filterNodes(const GR& graph, NF& node_filter_map) {
-    return FilterNodes<const GR, NF>(graph, node_filter_map);
-  }
-
-  template<typename GR, typename NF>
-  FilterNodes<const GR, const NF>
-  filterNodes(const GR& graph, const NF& node_filter_map) {
-    return FilterNodes<const GR, const NF>(graph, node_filter_map);
-  }
-
-  /// \ingroup graph_adaptors
-  ///
-  /// \brief Adaptor class for hiding arcs in a digraph.
-  ///
-  /// FilterArcs adaptor can be used for hiding arcs in a digraph.
-  /// A \c bool arc map must be specified, which defines the filter for
-  /// the arcs. Only the arcs with \c true filter value are shown in the
-  /// subdigraph. This adaptor conforms to the \ref concepts::Digraph
-  /// "Digraph" concept.
-  ///
-  /// The adapted digraph can also be modified through this adaptor
-  /// by adding or removing nodes or arcs, unless the \c GR template
-  /// parameter is set to be \c const.
-  ///
-  /// \tparam GR The type of the adapted digraph.
-  /// It must conform to the \ref concepts::Digraph "Digraph" concept.
-  /// It can also be specified to be \c const.
-  /// \tparam AF The type of the arc filter map.
-  /// It must be a \c bool (or convertible) arc map of the
-  /// adapted digraph. The default type is
-  /// \ref concepts::Digraph::ArcMap "GR::ArcMap<bool>".
-  ///
-  /// \note The \c Node and \c Arc types of this adaptor and the adapted
-  /// digraph are convertible to each other.
-#ifdef DOXYGEN
-  template<typename GR,
-           typename AF>
-  class FilterArcs {
-#else
-  template<typename GR,
-           typename AF = typename GR::template ArcMap<bool> >
+  ///
+  /// \brief An adaptor for hiding arcs from a digraph.
+  ///
+  /// FilterArcs adaptor hides arcs in a digraph. A bool arc map must
+  /// be specified, which defines the filters for arcs. Just the
+  /// unfiltered arcs are shown in the subdigraph. The FilterArcs is
+  /// conform to the \ref concepts::Digraph "Digraph concept".
+  ///
+  /// \tparam _Digraph It must be conform to the \ref concepts::Digraph
+  /// "Digraph concept". The type can be specified to be const.
+  /// \tparam _ArcFilterMap A bool valued arc map of the the adapted
+  /// graph.
+  template<typename _Digraph, typename _ArcFilterMap>
   class FilterArcs :
-    public DigraphAdaptorExtender<
-      SubDigraphBase<GR, ConstMap<typename GR::Node, bool>, AF, false> > {
-#endif
-  public:
-    /// The type of the adapted digraph.
-    typedef GR Digraph;
-    /// The type of the arc filter map.
-    typedef AF ArcFilterMap;
-
-    typedef DigraphAdaptorExtender<
-      SubDigraphBase<GR, ConstMap<typename GR::Node, bool>, AF, false> >
-      Parent;
+    public SubDigraph<_Digraph, ConstMap<typename _Digraph::Node, bool>,
+                      _ArcFilterMap, false> {
+  public:
+    typedef _Digraph Digraph;
+    typedef _ArcFilterMap ArcFilterMap;
+
+    typedef SubDigraph<Digraph, ConstMap<typename Digraph::Node, bool>,
+                       ArcFilterMap, false> Parent;
 
     typedef typename Parent::Arc Arc;
@@ -1657,6 +1531,6 @@
     /// \brief Constructor
     ///
-    /// Creates a subdigraph for the given digraph with the given arc
-    /// filter map.
+    /// Creates a FilterArcs adaptor for the given graph with
+    /// given arc map filter.
     FilterArcs(Digraph& digraph, ArcFilterMap& arc_filter)
       : Parent(), const_true_map(true) {
@@ -1666,96 +1540,64 @@
     }
 
-    /// \brief Sets the status of the given arc
-    ///
-    /// This function sets the status of the given arc.
-    /// It is done by simply setting the assigned value of \c a
-    /// to \c v in the arc filter map.
-    void status(const Arc& a, bool v) const { Parent::status(a, v); }
-
-    /// \brief Returns the status of the given arc
-    ///
-    /// This function returns the status of the given arc.
-    /// It is \c true if the given arc is enabled (i.e. not hidden).
-    bool status(const Arc& a) const { return Parent::status(a); }
-
-    /// \brief Disables the given arc
-    ///
-    /// This function disables the given arc in the subdigraph,
-    /// so the iteration jumps over it.
-    /// It is the same as \ref status() "status(a, false)".
-    void disable(const Arc& a) const { Parent::status(a, false); }
-
-    /// \brief Enables the given arc
-    ///
-    /// This function enables the given arc in the subdigraph.
-    /// It is the same as \ref status() "status(a, true)".
-    void enable(const Arc& a) const { Parent::status(a, true); }
+    /// \brief Hides the arc of the graph
+    ///
+    /// This function hides \c a in the graph, i.e. the iteration
+    /// jumps over it. This is done by simply setting the value of \c a
+    /// to be false in the corresponding arc map.
+    void hide(const Arc& a) const { Parent::hide(a); }
+
+    /// \brief Unhides the arc of the graph
+    ///
+    /// The value of \c a is set to be true in the arc-map which stores
+    /// hide information. If \c a was hidden previuosly, then it is shown
+    /// again
+    void unHide(const Arc& a) const { Parent::unHide(a); }
+
+    /// \brief Returns true if \c a is hidden.
+    ///
+    /// Returns true if \c a is hidden.
+    ///
+    bool hidden(const Arc& a) const { return Parent::hidden(a); }
 
   };
 
-  /// \brief Returns a read-only FilterArcs adaptor
-  ///
-  /// This function just returns a read-only \ref FilterArcs adaptor.
+  /// \brief Just gives back an FilterArcs adaptor
+  ///
+  /// Just gives back an FilterArcs adaptor
+  template<typename Digraph, typename ArcFilterMap>
+  FilterArcs<const Digraph, ArcFilterMap>
+  filterArcs(const Digraph& digraph, ArcFilterMap& afm) {
+    return FilterArcs<const Digraph, ArcFilterMap>(digraph, afm);
+  }
+
+  template<typename Digraph, typename ArcFilterMap>
+  FilterArcs<const Digraph, const ArcFilterMap>
+  filterArcs(const Digraph& digraph, const ArcFilterMap& afm) {
+    return FilterArcs<const Digraph, const ArcFilterMap>(digraph, afm);
+  }
+
   /// \ingroup graph_adaptors
-  /// \relates FilterArcs
-  template<typename GR, typename AF>
-  FilterArcs<const GR, AF>
-  filterArcs(const GR& digraph, AF& arc_filter_map) {
-    return FilterArcs<const GR, AF>(digraph, arc_filter_map);
-  }
-
-  template<typename GR, typename AF>
-  FilterArcs<const GR, const AF>
-  filterArcs(const GR& digraph, const AF& arc_filter_map) {
-    return FilterArcs<const GR, const AF>(digraph, arc_filter_map);
-  }
-
-  /// \ingroup graph_adaptors
-  ///
-  /// \brief Adaptor class for hiding edges in a graph.
-  ///
-  /// FilterEdges adaptor can be used for hiding edges in a graph.
-  /// A \c bool edge map must be specified, which defines the filter for
-  /// the edges. Only the edges with \c true filter value are shown in the
-  /// subgraph. This adaptor conforms to the \ref concepts::Graph
-  /// "Graph" concept.
-  ///
-  /// The adapted graph can also be modified through this adaptor
-  /// by adding or removing nodes or edges, unless the \c GR template
-  /// parameter is set to be \c const.
-  ///
-  /// \tparam GR The type of the adapted graph.
-  /// It must conform to the \ref concepts::Graph "Graph" concept.
-  /// It can also be specified to be \c const.
-  /// \tparam EF The type of the edge filter map.
-  /// It must be a \c bool (or convertible) edge map of the
-  /// adapted graph. The default type is
-  /// \ref concepts::Graph::EdgeMap "GR::EdgeMap<bool>".
-  ///
-  /// \note The \c Node, \c Edge and \c Arc types of this adaptor and the
-  /// adapted graph are convertible to each other.
-#ifdef DOXYGEN
-  template<typename GR,
-           typename EF>
-  class FilterEdges {
-#else
-  template<typename GR,
-           typename EF = typename GR::template EdgeMap<bool> >
+  ///
+  /// \brief An adaptor for hiding edges from a graph.
+  ///
+  /// FilterEdges adaptor hides edges in a digraph. A bool edge map must
+  /// be specified, which defines the filters for edges. Just the
+  /// unfiltered edges are shown in the subdigraph. The FilterEdges is
+  /// conform to the \ref concepts::Graph "Graph concept".
+  ///
+  /// \tparam _Graph It must be conform to the \ref concepts::Graph
+  /// "Graph concept". The type can be specified to be const.
+  /// \tparam _EdgeFilterMap A bool valued edge map of the the adapted
+  /// graph.
+  template<typename _Graph, typename _EdgeFilterMap>
   class FilterEdges :
-    public GraphAdaptorExtender<
-      SubGraphBase<GR, ConstMap<typename GR::Node,bool>, EF, false> > {
-#endif
-  public:
-    /// The type of the adapted graph.
-    typedef GR Graph;
-    /// The type of the edge filter map.
-    typedef EF EdgeFilterMap;
-
-    typedef GraphAdaptorExtender<
-      SubGraphBase<GR, ConstMap<typename GR::Node,bool>, EF, false> >
-      Parent;
-
+    public SubGraph<_Graph, ConstMap<typename _Graph::Node,bool>,
+                    _EdgeFilterMap, false> {
+  public:
+    typedef _Graph Graph;
+    typedef _EdgeFilterMap EdgeFilterMap;
+    typedef SubGraph<Graph, ConstMap<typename Graph::Node,bool>,
+                     EdgeFilterMap, false> Parent;
     typedef typename Parent::Edge Edge;
-
   protected:
     ConstMap<typename Graph::Node, bool> const_true_map;
@@ -1769,58 +1611,49 @@
     /// \brief Constructor
     ///
-    /// Creates a subgraph for the given graph with the given edge
-    /// filter map.
-    FilterEdges(Graph& graph, EdgeFilterMap& edge_filter_map) :
+    /// Creates a FilterEdges adaptor for the given graph with
+    /// given edge map filters.
+    FilterEdges(Graph& _graph, EdgeFilterMap& edge_filter_map) :
       Parent(), const_true_map(true) {
-      Parent::setGraph(graph);
+      Parent::setGraph(_graph);
       Parent::setNodeFilterMap(const_true_map);
       Parent::setEdgeFilterMap(edge_filter_map);
     }
 
-    /// \brief Sets the status of the given edge
-    ///
-    /// This function sets the status of the given edge.
-    /// It is done by simply setting the assigned value of \c e
-    /// to \c v in the edge filter map.
-    void status(const Edge& e, bool v) const { Parent::status(e, v); }
-
-    /// \brief Returns the status of the given edge
-    ///
-    /// This function returns the status of the given edge.
-    /// It is \c true if the given edge is enabled (i.e. not hidden).
-    bool status(const Edge& e) const { return Parent::status(e); }
-
-    /// \brief Disables the given edge
-    ///
-    /// This function disables the given edge in the subgraph,
-    /// so the iteration jumps over it.
-    /// It is the same as \ref status() "status(e, false)".
-    void disable(const Edge& e) const { Parent::status(e, false); }
-
-    /// \brief Enables the given edge
-    ///
-    /// This function enables the given edge in the subgraph.
-    /// It is the same as \ref status() "status(e, true)".
-    void enable(const Edge& e) const { Parent::status(e, true); }
+    /// \brief Hides the edge of the graph
+    ///
+    /// This function hides \c e in the graph, i.e. the iteration
+    /// jumps over it. This is done by simply setting the value of \c e
+    /// to be false in the corresponding edge-map.
+    void hide(const Edge& e) const { Parent::hide(e); }
+
+    /// \brief Unhides the edge of the graph
+    ///
+    /// The value of \c e is set to be true in the edge-map which stores
+    /// hide information. If \c e was hidden previuosly, then it is shown
+    /// again
+    void unHide(const Edge& e) const { Parent::unHide(e); }
+
+    /// \brief Returns true if \c e is hidden.
+    ///
+    /// Returns true if \c e is hidden.
+    ///
+    bool hidden(const Edge& e) const { return Parent::hidden(e); }
 
   };
 
-  /// \brief Returns a read-only FilterEdges adaptor
-  ///
-  /// This function just returns a read-only \ref FilterEdges adaptor.
-  /// \ingroup graph_adaptors
-  /// \relates FilterEdges
-  template<typename GR, typename EF>
-  FilterEdges<const GR, EF>
-  filterEdges(const GR& graph, EF& edge_filter_map) {
-    return FilterEdges<const GR, EF>(graph, edge_filter_map);
+  /// \brief Just gives back a FilterEdges adaptor
+  ///
+  /// Just gives back a FilterEdges adaptor
+  template<typename Graph, typename EdgeFilterMap>
+  FilterEdges<const Graph, EdgeFilterMap>
+  filterEdges(const Graph& graph, EdgeFilterMap& efm) {
+    return FilterEdges<const Graph, EdgeFilterMap>(graph, efm);
   }
 
-  template<typename GR, typename EF>
-  FilterEdges<const GR, const EF>
-  filterEdges(const GR& graph, const EF& edge_filter_map) {
-    return FilterEdges<const GR, const EF>(graph, edge_filter_map);
+  template<typename Graph, typename EdgeFilterMap>
+  FilterEdges<const Graph, const EdgeFilterMap>
+  filterEdges(const Graph& graph, const EdgeFilterMap& efm) {
+    return FilterEdges<const Graph, const EdgeFilterMap>(graph, efm);
   }
-
 
   template <typename _Digraph>
@@ -1862,4 +1695,6 @@
       }
     };
+
+
 
     void first(Node& n) const {
@@ -2011,13 +1846,10 @@
 
     typedef NodeNumTagIndicator<Digraph> NodeNumTag;
-    int nodeNum() const { return _digraph->nodeNum(); }
-
-    typedef ArcNumTagIndicator<Digraph> ArcNumTag;
+    int nodeNum() const { return 2 * _digraph->arcNum(); }
+    typedef EdgeNumTagIndicator<Digraph> EdgeNumTag;
     int arcNum() const { return 2 * _digraph->arcNum(); }
-
-    typedef ArcNumTag EdgeNumTag;
     int edgeNum() const { return _digraph->arcNum(); }
 
-    typedef FindArcTagIndicator<Digraph> FindArcTag;
+    typedef FindEdgeTagIndicator<Digraph> FindEdgeTag;
     Arc findArc(Node s, Node t, Arc p = INVALID) const {
       if (p == INVALID) {
@@ -2038,5 +1870,4 @@
     }
 
-    typedef FindArcTag FindEdgeTag;
     Edge findEdge(Node s, Node t, Edge p = INVALID) const {
       if (s != t) {
@@ -2046,5 +1877,5 @@
           arc = _digraph->findArc(t, s);
           if (arc != INVALID) return arc;
-        } else if (_digraph->source(p) == s) {
+        } else if (_digraph->s(p) == s) {
           Edge arc = _digraph->findArc(s, t, p);
           if (arc != INVALID) return arc;
@@ -2075,8 +1906,4 @@
       typedef _Value Value;
       typedef Arc Key;
-      typedef typename MapTraits<MapImpl>::ConstReturnValue ConstReturnValue;
-      typedef typename MapTraits<MapImpl>::ReturnValue ReturnValue;
-      typedef typename MapTraits<MapImpl>::ConstReturnValue ConstReference;
-      typedef typename MapTraits<MapImpl>::ReturnValue Reference;
 
       ArcMapBase(const Adaptor& adaptor) :
@@ -2094,5 +1921,6 @@
       }
 
-      ConstReturnValue operator[](const Arc& a) const {
+      typename MapTraits<MapImpl>::ConstReturnValue
+      operator[](const Arc& a) const {
         if (direction(a)) {
           return _forward[a];
@@ -2102,5 +1930,6 @@
       }
 
-      ReturnValue operator[](const Arc& a) {
+      typename MapTraits<MapImpl>::ReturnValue
+      operator[](const Arc& a) {
         if (direction(a)) {
           return _forward[a];
@@ -2152,5 +1981,5 @@
       typedef SubMapExtender<Adaptor, ArcMapBase<Value> > Parent;
 
-      explicit ArcMap(const Adaptor& adaptor)
+      ArcMap(const Adaptor& adaptor)
         : Parent(adaptor) {}
 
@@ -2199,7 +2028,4 @@
     NodeNotifier& notifier(Node) const { return _digraph->notifier(Node()); }
 
-    typedef typename ItemSetTraits<Digraph, Edge>::ItemNotifier EdgeNotifier;
-    EdgeNotifier& notifier(Edge) const { return _digraph->notifier(Edge()); }
-
   protected:
 
@@ -2216,36 +2042,20 @@
   /// \ingroup graph_adaptors
   ///
-  /// \brief Adaptor class for viewing a digraph as an undirected graph.
-  ///
-  /// Undirector adaptor can be used for viewing a digraph as an undirected
-  /// graph. All arcs of the underlying digraph are showed in the
-  /// adaptor as an edge (and also as a pair of arcs, of course).
-  /// This adaptor conforms to the \ref concepts::Graph "Graph" concept.
-  ///
-  /// The adapted digraph can also be modified through this adaptor
-  /// by adding or removing nodes or edges, unless the \c GR template
-  /// parameter is set to be \c const.
-  ///
-  /// \tparam GR The type of the adapted digraph.
-  /// It must conform to the \ref concepts::Digraph "Digraph" concept.
-  /// It can also be specified to be \c const.
-  ///
-  /// \note The \c Node type of this adaptor and the adapted digraph are
-  /// convertible to each other, moreover the \c Edge type of the adaptor
-  /// and the \c Arc type of the adapted digraph are also convertible to
-  /// each other.
-  /// (Thus the \c Arc type of the adaptor is convertible to the \c Arc type
-  /// of the adapted digraph.)
-  template<typename GR>
-#ifdef DOXYGEN
-  class Undirector {
-#else
-  class Undirector :
-    public GraphAdaptorExtender<UndirectorBase<GR> > {
-#endif
-  public:
-    /// The type of the adapted digraph.
-    typedef GR Digraph;
-    typedef GraphAdaptorExtender<UndirectorBase<GR> > Parent;
+  /// \brief Undirect the graph
+  ///
+  /// This adaptor makes an undirected graph from a directed
+  /// graph. All arcs of the underlying digraph will be showed in the
+  /// adaptor as an edge. The Orienter adaptor is conform to the \ref
+  /// concepts::Graph "Graph concept".
+  ///
+  /// \tparam _Digraph It must be conform to the \ref
+  /// concepts::Digraph "Digraph concept". The type can be specified
+  /// to const.
+  template<typename _Digraph>
+  class Undirector
+    : public GraphAdaptorExtender<UndirectorBase<_Digraph> > {
+  public:
+    typedef _Digraph Digraph;
+    typedef GraphAdaptorExtender<UndirectorBase<Digraph> > Parent;
   protected:
     Undirector() { }
@@ -2254,36 +2064,35 @@
     /// \brief Constructor
     ///
-    /// Creates an undirected graph from the given digraph.
-    Undirector(Digraph& digraph) {
+    /// Creates a undirected graph from the given digraph
+    Undirector(_Digraph& digraph) {
       setDigraph(digraph);
     }
 
-    /// \brief Arc map combined from two original arc maps
-    ///
-    /// This map adaptor class adapts two arc maps of the underlying
-    /// digraph to get an arc map of the undirected graph.
-    /// Its value type is inherited from the first arc map type
-    /// (\c %ForwardMap).
-    template <typename ForwardMap, typename BackwardMap>
+    /// \brief ArcMap combined from two original ArcMap
+    ///
+    /// This class adapts two original digraph ArcMap to
+    /// get an arc map on the undirected graph.
+    template <typename _ForwardMap, typename _BackwardMap>
     class CombinedArcMap {
     public:
 
-      /// The key type of the map
+      typedef _ForwardMap ForwardMap;
+      typedef _BackwardMap BackwardMap;
+
+      typedef typename MapTraits<ForwardMap>::ReferenceMapTag ReferenceMapTag;
+
+      typedef typename ForwardMap::Value Value;
       typedef typename Parent::Arc Key;
-      /// The value type of the map
-      typedef typename ForwardMap::Value Value;
-
-      typedef typename MapTraits<ForwardMap>::ReferenceMapTag ReferenceMapTag;
-
-      typedef typename MapTraits<ForwardMap>::ReturnValue ReturnValue;
-      typedef typename MapTraits<ForwardMap>::ConstReturnValue ConstReturnValue;
-      typedef typename MapTraits<ForwardMap>::ReturnValue Reference;
-      typedef typename MapTraits<ForwardMap>::ConstReturnValue ConstReference;
-
+
+      /// \brief Constructor
+      ///
       /// Constructor
       CombinedArcMap(ForwardMap& forward, BackwardMap& backward)
         : _forward(&forward), _backward(&backward) {}
 
-      /// Sets the value associated with the given key.
+
+      /// \brief Sets the value associated with a key.
+      ///
+      /// Sets the value associated with a key.
       void set(const Key& e, const Value& a) {
         if (Parent::direction(e)) {
@@ -2294,6 +2103,9 @@
       }
 
-      /// Returns the value associated with the given key.
-      ConstReturnValue operator[](const Key& e) const {
+      /// \brief Returns the value associated with a key.
+      ///
+      /// Returns the value associated with a key.
+      typename MapTraits<ForwardMap>::ConstReturnValue
+      operator[](const Key& e) const {
         if (Parent::direction(e)) {
           return (*_forward)[e];
@@ -2303,6 +2115,9 @@
       }
 
-      /// Returns a reference to the value associated with the given key.
-      ReturnValue operator[](const Key& e) {
+      /// \brief Returns the value associated with a key.
+      ///
+      /// Returns the value associated with a key.
+      typename MapTraits<ForwardMap>::ReturnValue
+      operator[](const Key& e) {
         if (Parent::direction(e)) {
           return (*_forward)[e];
@@ -2319,7 +2134,7 @@
     };
 
-    /// \brief Returns a combined arc map
-    ///
-    /// This function just returns a combined arc map.
+    /// \brief Just gives back a combined arc map
+    ///
+    /// Just gives back a combined arc map
     template <typename ForwardMap, typename BackwardMap>
     static CombinedArcMap<ForwardMap, BackwardMap>
@@ -2351,14 +2166,12 @@
   };
 
-  /// \brief Returns a read-only Undirector adaptor
-  ///
-  /// This function just returns a read-only \ref Undirector adaptor.
-  /// \ingroup graph_adaptors
-  /// \relates Undirector
-  template<typename GR>
-  Undirector<const GR> undirector(const GR& digraph) {
-    return Undirector<const GR>(digraph);
+  /// \brief Just gives back an undirected view of the given digraph
+  ///
+  /// Just gives back an undirected view of the given digraph
+  template<typename Digraph>
+  Undirector<const Digraph>
+  undirector(const Digraph& digraph) {
+    return Undirector<const Digraph>(digraph);
   }
-
 
   template <typename _Graph, typename _DirectionMap>
@@ -2379,10 +2192,10 @@
     void first(Arc& i) const { _graph->first(i); }
     void firstIn(Arc& i, const Node& n) const {
-      bool d = true;
+      bool d;
       _graph->firstInc(i, d, n);
       while (i != INVALID && d == (*_direction)[i]) _graph->nextInc(i, d);
     }
     void firstOut(Arc& i, const Node& n ) const {
-      bool d = true;
+      bool d;
       _graph->firstInc(i, d, n);
       while (i != INVALID && d != (*_direction)[i]) _graph->nextInc(i, d);
@@ -2412,13 +2225,22 @@
     int nodeNum() const { return _graph->nodeNum(); }
 
-    typedef EdgeNumTagIndicator<Graph> ArcNumTag;
+    typedef EdgeNumTagIndicator<Graph> EdgeNumTag;
     int arcNum() const { return _graph->edgeNum(); }
 
-    typedef FindEdgeTagIndicator<Graph> FindArcTag;
+    typedef FindEdgeTagIndicator<Graph> FindEdgeTag;
     Arc findArc(const Node& u, const Node& v,
-                const Arc& prev = INVALID) const {
-      Arc arc = _graph->findEdge(u, v, prev);
-      while (arc != INVALID && source(arc) != u) {
+                const Arc& prev = INVALID) {
+      Arc arc = prev;
+      bool d = arc == INVALID ? true : (*_direction)[arc];
+      if (d) {
         arc = _graph->findEdge(u, v, arc);
+        while (arc != INVALID && !(*_direction)[arc]) {
+          _graph->findEdge(u, v, arc);
+        }
+        if (arc != INVALID) return arc;
+      }
+      _graph->findEdge(v, u, arc);
+      while (arc != INVALID && (*_direction)[arc]) {
+        _graph->findEdge(u, v, arc);
       }
       return arc;
@@ -2430,6 +2252,6 @@
 
     Arc addArc(const Node& u, const Node& v) {
-      Arc arc = _graph->addEdge(u, v);
-      _direction->set(arc, _graph->u(arc) == u);
+      Arc arc = _graph->addArc(u, v);
+      _direction->set(arc, _graph->source(arc) == u);
       return arc;
     }
@@ -2522,47 +2344,26 @@
   /// \ingroup graph_adaptors
   ///
-  /// \brief Adaptor class for orienting the edges of a graph to get a digraph
-  ///
-  /// Orienter adaptor can be used for orienting the edges of a graph to
-  /// get a digraph. A \c bool edge map of the underlying graph must be
-  /// specified, which define the direction of the arcs in the adaptor.
-  /// The arcs can be easily reversed by the \c reverseArc() member function
-  /// of the adaptor.
-  /// This class conforms to the \ref concepts::Digraph "Digraph" concept.
-  ///
-  /// The adapted graph can also be modified through this adaptor
-  /// by adding or removing nodes or arcs, unless the \c GR template
-  /// parameter is set to be \c const.
-  ///
-  /// \tparam GR The type of the adapted graph.
-  /// It must conform to the \ref concepts::Graph "Graph" concept.
-  /// It can also be specified to be \c const.
-  /// \tparam DM The type of the direction map.
-  /// It must be a \c bool (or convertible) edge map of the
-  /// adapted graph. The default type is
-  /// \ref concepts::Graph::EdgeMap "GR::EdgeMap<bool>".
-  ///
-  /// \note The \c Node type of this adaptor and the adapted graph are
-  /// convertible to each other, moreover the \c Arc type of the adaptor
-  /// and the \c Edge type of the adapted graph are also convertible to
-  /// each other.
-#ifdef DOXYGEN
-  template<typename GR,
-           typename DM>
-  class Orienter {
-#else
-  template<typename GR,
-           typename DM = typename GR::template EdgeMap<bool> >
+  /// \brief Orients the edges of the graph to get a digraph
+  ///
+  /// This adaptor orients each edge in the undirected graph. The
+  /// direction of the arcs stored in an edge node map.  The arcs can
+  /// be easily reverted by the \c reverseArc() member function in the
+  /// adaptor. The Orienter adaptor is conform to the \ref
+  /// concepts::Digraph "Digraph concept".
+  ///
+  /// \tparam _Graph It must be conform to the \ref concepts::Graph
+  /// "Graph concept". The type can be specified to be const.
+  /// \tparam _DirectionMap A bool valued edge map of the the adapted
+  /// graph.
+  ///
+  /// \sa orienter
+  template<typename _Graph,
+           typename DirectionMap = typename _Graph::template EdgeMap<bool> >
   class Orienter :
-    public DigraphAdaptorExtender<OrienterBase<GR, DM> > {
-#endif
-  public:
-
-    /// The type of the adapted graph.
-    typedef GR Graph;
-    /// The type of the direction edge map.
-    typedef DM DirectionMap;
-
-    typedef DigraphAdaptorExtender<OrienterBase<GR, DM> > Parent;
+    public DigraphAdaptorExtender<OrienterBase<_Graph, DirectionMap> > {
+  public:
+    typedef _Graph Graph;
+    typedef DigraphAdaptorExtender<
+      OrienterBase<_Graph, DirectionMap> > Parent;
     typedef typename Parent::Arc Arc;
   protected:
@@ -2570,7 +2371,7 @@
   public:
 
-    /// \brief Constructor
-    ///
-    /// Constructor of the adaptor.
+    /// \brief Constructor of the adaptor
+    ///
+    /// Constructor of the adaptor
     Orienter(Graph& graph, DirectionMap& direction) {
       setGraph(graph);
@@ -2578,9 +2379,7 @@
     }
 
-    /// \brief Reverses the given arc
-    ///
-    /// This function reverses the given arc.
-    /// It is done by simply negate the assigned value of \c a
-    /// in the direction map.
+    /// \brief Reverse arc
+    ///
+    /// It reverse the given arc. It simply negate the direction in the map.
     void reverseArc(const Arc& a) {
       Parent::reverseArc(a);
@@ -2588,29 +2387,32 @@
   };
 
-  /// \brief Returns a read-only Orienter adaptor
-  ///
-  /// This function just returns a read-only \ref Orienter adaptor.
-  /// \ingroup graph_adaptors
-  /// \relates Orienter
-  template<typename GR, typename DM>
-  Orienter<const GR, DM>
-  orienter(const GR& graph, DM& direction_map) {
-    return Orienter<const GR, DM>(graph, direction_map);
+  /// \brief Just gives back a Orienter
+  ///
+  /// Just gives back a Orienter
+  template<typename Graph, typename DirectionMap>
+  Orienter<const Graph, DirectionMap>
+  orienter(const Graph& graph, DirectionMap& dm) {
+    return Orienter<const Graph, DirectionMap>(graph, dm);
   }
 
-  template<typename GR, typename DM>
-  Orienter<const GR, const DM>
-  orienter(const GR& graph, const DM& direction_map) {
-    return Orienter<const GR, const DM>(graph, direction_map);
+  template<typename Graph, typename DirectionMap>
+  Orienter<const Graph, const DirectionMap>
+  orienter(const Graph& graph, const DirectionMap& dm) {
+    return Orienter<const Graph, const DirectionMap>(graph, dm);
   }
 
   namespace _adaptor_bits {
 
-    template<typename Digraph,
-             typename CapacityMap,
-             typename FlowMap,
-             typename Tolerance>
+    template<typename _Digraph,
+             typename _CapacityMap = typename _Digraph::template ArcMap<int>,
+             typename _FlowMap = _CapacityMap,
+             typename _Tolerance = Tolerance<typename _CapacityMap::Value> >
     class ResForwardFilter {
     public:
+
+      typedef _Digraph Digraph;
+      typedef _CapacityMap CapacityMap;
+      typedef _FlowMap FlowMap;
+      typedef _Tolerance Tolerance;
 
       typedef typename Digraph::Arc Key;
@@ -2633,10 +2435,15 @@
     };
 
-    template<typename Digraph,
-             typename CapacityMap,
-             typename FlowMap,
-             typename Tolerance>
+    template<typename _Digraph,
+             typename _CapacityMap = typename _Digraph::template ArcMap<int>,
+             typename _FlowMap = _CapacityMap,
+             typename _Tolerance = Tolerance<typename _CapacityMap::Value> >
     class ResBackwardFilter {
     public:
+
+      typedef _Digraph Digraph;
+      typedef _CapacityMap CapacityMap;
+      typedef _FlowMap FlowMap;
+      typedef _Tolerance Tolerance;
 
       typedef typename Digraph::Arc Key;
@@ -2664,72 +2471,51 @@
   /// \ingroup graph_adaptors
   ///
-  /// \brief Adaptor class for composing the residual digraph for directed
+  /// \brief An adaptor for composing the residual graph for directed
   /// flow and circulation problems.
   ///
-  /// ResidualDigraph can be used for composing the \e residual digraph
-  /// for directed flow and circulation problems. Let \f$ G=(V, A) \f$
-  /// be a directed graph and let \f$ F \f$ be a number type.
-  /// Let \f$ flow, cap: A\to F \f$ be functions on the arcs.
-  /// This adaptor implements a digraph structure with node set \f$ V \f$
-  /// and arc set \f$ A_{forward}\cup A_{backward} \f$,
-  /// where \f$ A_{forward}=\{uv : uv\in A, flow(uv)<cap(uv)\} \f$ and
-  /// \f$ A_{backward}=\{vu : uv\in A, flow(uv)>0\} \f$, i.e. the so
-  /// called residual digraph.
-  /// When the union \f$ A_{forward}\cup A_{backward} \f$ is taken,
-  /// multiplicities are counted, i.e. the adaptor has exactly
-  /// \f$ |A_{forward}| + |A_{backward}|\f$ arcs (it may have parallel
-  /// arcs).
-  /// This class conforms to the \ref concepts::Digraph "Digraph" concept.
-  ///
-  /// \tparam GR The type of the adapted digraph.
-  /// It must conform to the \ref concepts::Digraph "Digraph" concept.
-  /// It is implicitly \c const.
-  /// \tparam CM The type of the capacity map.
-  /// It must be an arc map of some numerical type, which defines
-  /// the capacities in the flow problem. It is implicitly \c const.
-  /// The default type is
-  /// \ref concepts::Digraph::ArcMap "GR::ArcMap<int>".
-  /// \tparam FM The type of the flow map.
-  /// It must be an arc map of some numerical type, which defines
-  /// the flow values in the flow problem. The default type is \c CM.
-  /// \tparam TL The tolerance type for handling inexact computation.
-  /// The default tolerance type depends on the value type of the
-  /// capacity map.
-  ///
-  /// \note This adaptor is implemented using Undirector and FilterArcs
-  /// adaptors.
-  ///
-  /// \note The \c Node type of this adaptor and the adapted digraph are
-  /// convertible to each other, moreover the \c Arc type of the adaptor
-  /// is convertible to the \c Arc type of the adapted digraph.
-#ifdef DOXYGEN
-  template<typename GR, typename CM, typename FM, typename TL>
-  class ResidualDigraph
-#else
-  template<typename GR,
-           typename CM = typename GR::template ArcMap<int>,
-           typename FM = CM,
-           typename TL = Tolerance<typename CM::Value> >
-  class ResidualDigraph :
+  /// An adaptor for composing the residual graph for directed flow and
+  /// circulation problems.  Let \f$ G=(V, A) \f$ be a directed graph
+  /// and let \f$ F \f$ be a number type. Let moreover \f$ f,c:A\to F \f$,
+  /// be functions on the arc-set.
+  ///
+  /// Then Residual implements the digraph structure with
+  /// node-set \f$ V \f$ and arc-set \f$ A_{forward}\cup A_{backward} \f$,
+  /// where \f$ A_{forward}=\{uv : uv\in A, f(uv)<c(uv)\} \f$ and
+  /// \f$ A_{backward}=\{vu : uv\in A, f(uv)>0\} \f$, i.e. the so
+  /// called residual graph.  When we take the union
+  /// \f$ A_{forward}\cup A_{backward} \f$, multiplicities are counted,
+  /// i.e.  if an arc is in both \f$ A_{forward} \f$ and
+  /// \f$ A_{backward} \f$, then in the adaptor it appears in both
+  /// orientation.
+  ///
+  /// \tparam _Digraph It must be conform to the \ref concepts::Digraph
+  /// "Digraph concept". The type is implicitly const.
+  /// \tparam _CapacityMap An arc map of some numeric type, it defines
+  /// the capacities in the flow problem. The map is implicitly const.
+  /// \tparam _FlowMap An arc map of some numeric type, it defines
+  /// the capacities in the flow problem.
+  /// \tparam _Tolerance Handler for inexact computation.
+  template<typename _Digraph,
+           typename _CapacityMap = typename _Digraph::template ArcMap<int>,
+           typename _FlowMap = _CapacityMap,
+           typename _Tolerance = Tolerance<typename _CapacityMap::Value> >
+  class Residual :
     public FilterArcs<
-      Undirector<const GR>,
-      typename Undirector<const GR>::template CombinedArcMap<
-        _adaptor_bits::ResForwardFilter<const GR, CM, FM, TL>,
-        _adaptor_bits::ResBackwardFilter<const GR, CM, FM, TL> > >
-#endif
+    Undirector<const _Digraph>,
+    typename Undirector<const _Digraph>::template CombinedArcMap<
+      _adaptor_bits::ResForwardFilter<const _Digraph, _CapacityMap,
+                                      _FlowMap, _Tolerance>,
+      _adaptor_bits::ResBackwardFilter<const _Digraph, _CapacityMap,
+                                       _FlowMap, _Tolerance> > >
   {
   public:
 
-    /// The type of the underlying digraph.
-    typedef GR Digraph;
-    /// The type of the capacity map.
-    typedef CM CapacityMap;
-    /// The type of the flow map.
-    typedef FM FlowMap;
-    /// The tolerance type.
-    typedef TL Tolerance;
+    typedef _Digraph Digraph;
+    typedef _CapacityMap CapacityMap;
+    typedef _FlowMap FlowMap;
+    typedef _Tolerance Tolerance;
 
     typedef typename CapacityMap::Value Value;
-    typedef ResidualDigraph Adaptor;
+    typedef Residual Adaptor;
 
   protected:
@@ -2744,5 +2530,5 @@
 
     typedef typename Undirected::
-      template CombinedArcMap<ForwardFilter, BackwardFilter> ArcFilter;
+    template CombinedArcMap<ForwardFilter, BackwardFilter> ArcFilter;
 
     typedef FilterArcs<Undirected, ArcFilter> Parent;
@@ -2758,10 +2544,10 @@
   public:
 
-    /// \brief Constructor
-    ///
-    /// Constructor of the residual digraph adaptor. The parameters are the
-    /// digraph, the capacity map, the flow map, and a tolerance object.
-    ResidualDigraph(const Digraph& digraph, const CapacityMap& capacity,
-                    FlowMap& flow, const Tolerance& tolerance = Tolerance())
+    /// \brief Constructor of the residual digraph.
+    ///
+    /// Constructor of the residual graph. The parameters are the digraph,
+    /// the flow map, the capacity map and a tolerance object.
+    Residual(const Digraph& digraph, const CapacityMap& capacity,
+             FlowMap& flow, const Tolerance& tolerance = Tolerance())
       : Parent(), _capacity(&capacity), _flow(&flow), _graph(digraph),
         _forward_filter(capacity, flow, tolerance),
@@ -2775,7 +2561,7 @@
     typedef typename Parent::Arc Arc;
 
-    /// \brief Returns the residual capacity of the given arc.
-    ///
-    /// Returns the residual capacity of the given arc.
+    /// \brief Gives back the residual capacity of the arc.
+    ///
+    /// Gives back the residual capacity of the arc.
     Value residualCapacity(const Arc& a) const {
       if (Undirected::direction(a)) {
@@ -2786,9 +2572,9 @@
     }
 
-    /// \brief Augments on the given arc in the residual digraph.
-    ///
-    /// Augments on the given arc in the residual digraph. It increases
-    /// or decreases the flow value on the original arc according to the
-    /// direction of the residual arc.
+    /// \brief Augment on the given arc in the residual graph.
+    ///
+    /// Augment on the given arc in the residual graph. It increase
+    /// or decrease the flow on the original arc depend on the direction
+    /// of the residual arc.
     void augment(const Arc& a, const Value& v) const {
       if (Undirected::direction(a)) {
@@ -2799,32 +2585,28 @@
     }
 
-    /// \brief Returns \c true if the given residual arc is a forward arc.
-    ///
-    /// Returns \c true if the given residual arc has the same orientation
-    /// as the original arc, i.e. it is a so called forward arc.
+    /// \brief Returns the direction of the arc.
+    ///
+    /// Returns true when the arc is same oriented as the original arc.
     static bool forward(const Arc& a) {
       return Undirected::direction(a);
     }
 
-    /// \brief Returns \c true if the given residual arc is a backward arc.
-    ///
-    /// Returns \c true if the given residual arc has the opposite orientation
-    /// than the original arc, i.e. it is a so called backward arc.
+    /// \brief Returns the direction of the arc.
+    ///
+    /// Returns true when the arc is opposite oriented as the original arc.
     static bool backward(const Arc& a) {
       return !Undirected::direction(a);
     }
 
-    /// \brief Returns the forward oriented residual arc.
-    ///
-    /// Returns the forward oriented residual arc related to the given
-    /// arc of the underlying digraph.
+    /// \brief Gives back the forward oriented residual arc.
+    ///
+    /// Gives back the forward oriented residual arc.
     static Arc forward(const typename Digraph::Arc& a) {
       return Undirected::direct(a, true);
     }
 
-    /// \brief Returns the backward oriented residual arc.
-    ///
-    /// Returns the backward oriented residual arc related to the given
-    /// arc of the underlying digraph.
+    /// \brief Gives back the backward oriented residual arc.
+    ///
+    /// Gives back the backward oriented residual arc.
     static Arc backward(const typename Digraph::Arc& a) {
       return Undirected::direct(a, false);
@@ -2833,20 +2615,19 @@
     /// \brief Residual capacity map.
     ///
-    /// This map adaptor class can be used for obtaining the residual
-    /// capacities as an arc map of the residual digraph.
-    /// Its value type is inherited from the capacity map.
+    /// In generic residual graph the residual capacity can be obtained
+    /// as a map.
     class ResidualCapacity {
     protected:
       const Adaptor* _adaptor;
     public:
-      /// The key type of the map
+      /// The Key type
       typedef Arc Key;
-      /// The value type of the map
-      typedef typename CapacityMap::Value Value;
+      /// The Value type
+      typedef typename _CapacityMap::Value Value;
 
       /// Constructor
       ResidualCapacity(const Adaptor& adaptor) : _adaptor(&adaptor) {}
 
-      /// Returns the value associated with the given residual arc
+      /// \e
       Value operator[](const Arc& a) const {
         return _adaptor->residualCapacity(a);
@@ -2855,24 +2636,5 @@
     };
 
-    /// \brief Returns a residual capacity map
-    ///
-    /// This function just returns a residual capacity map.
-    ResidualCapacity residualCapacity() const {
-      return ResidualCapacity(*this);
-    }
-
   };
-
-  /// \brief Returns a (read-only) Residual adaptor
-  ///
-  /// This function just returns a (read-only) \ref Residual adaptor.
-  /// \ingroup graph_adaptors
-  /// \relates Residual
-  template<typename GR, typename CM, typename FM>
-  ResidualDigraph<GR, CM, FM>
-  residualDigraph(const GR& digraph, const CM& capacity_map, FM& flow_map) {
-    return ResidualDigraph<GR, CM, FM> (digraph, capacity_map, flow_map);
-  }
-
 
   template <typename _Digraph>
@@ -3123,24 +2885,28 @@
 
     typedef True NodeNumTag;
+
     int nodeNum() const {
       return  2 * countNodes(*_digraph);
     }
 
-    typedef True ArcNumTag;
+    typedef True EdgeNumTag;
     int arcNum() const {
       return countArcs(*_digraph) + countNodes(*_digraph);
     }
 
-    typedef True FindArcTag;
+    typedef True FindEdgeTag;
     Arc findArc(const Node& u, const Node& v,
                 const Arc& prev = INVALID) const {
-      if (inNode(u) && outNode(v)) {
-        if (static_cast<const DigraphNode&>(u) ==
-            static_cast<const DigraphNode&>(v) && prev == INVALID) {
-          return Arc(u);
+      if (inNode(u)) {
+        if (outNode(v)) {
+          if (static_cast<const DigraphNode&>(u) ==
+              static_cast<const DigraphNode&>(v) && prev == INVALID) {
+            return Arc(u);
+          }
         }
-      }
-      else if (outNode(u) && inNode(v)) {
-        return Arc(::lemon::findArc(*_digraph, u, v, prev));
+      } else {
+        if (inNode(v)) {
+          return Arc(::lemon::findArc(*_digraph, u, v, prev));
+        }
       }
       return INVALID;
@@ -3156,9 +2922,4 @@
       typedef Node Key;
       typedef _Value Value;
-      typedef typename MapTraits<NodeImpl>::ReferenceMapTag ReferenceMapTag;
-      typedef typename MapTraits<NodeImpl>::ReturnValue ReturnValue;
-      typedef typename MapTraits<NodeImpl>::ConstReturnValue ConstReturnValue;
-      typedef typename MapTraits<NodeImpl>::ReturnValue Reference;
-      typedef typename MapTraits<NodeImpl>::ConstReturnValue ConstReference;
 
       NodeMapBase(const Adaptor& adaptor)
@@ -3173,10 +2934,12 @@
       }
 
-      ReturnValue operator[](const Node& key) {
+      typename MapTraits<NodeImpl>::ReturnValue
+      operator[](const Node& key) {
         if (Adaptor::inNode(key)) { return _in_map[key]; }
         else { return _out_map[key]; }
       }
 
-      ConstReturnValue operator[](const Node& key) const {
+      typename MapTraits<NodeImpl>::ConstReturnValue
+      operator[](const Node& key) const {
         if (Adaptor::inNode(key)) { return _in_map[key]; }
         else { return _out_map[key]; }
@@ -3195,9 +2958,4 @@
       typedef Arc Key;
       typedef _Value Value;
-      typedef typename MapTraits<ArcImpl>::ReferenceMapTag ReferenceMapTag;
-      typedef typename MapTraits<ArcImpl>::ReturnValue ReturnValue;
-      typedef typename MapTraits<ArcImpl>::ConstReturnValue ConstReturnValue;
-      typedef typename MapTraits<ArcImpl>::ReturnValue Reference;
-      typedef typename MapTraits<ArcImpl>::ConstReturnValue ConstReference;
 
       ArcMapBase(const Adaptor& adaptor)
@@ -3215,5 +2973,6 @@
       }
 
-      ReturnValue operator[](const Arc& key) {
+      typename MapTraits<ArcImpl>::ReturnValue
+      operator[](const Arc& key) {
         if (Adaptor::origArc(key)) {
           return _arc_map[key._item.first()];
@@ -3223,5 +2982,6 @@
       }
 
-      ConstReturnValue operator[](const Arc& key) const {
+      typename MapTraits<ArcImpl>::ConstReturnValue
+      operator[](const Arc& key) const {
         if (Adaptor::origArc(key)) {
           return _arc_map[key._item.first()];
@@ -3304,39 +3064,29 @@
   /// \ingroup graph_adaptors
   ///
-  /// \brief Adaptor class for splitting the nodes of a digraph.
-  ///
-  /// SplitNodes adaptor can be used for splitting each node into an
-  /// \e in-node and an \e out-node in a digraph. Formaly, the adaptor
-  /// replaces each node \f$ u \f$ in the digraph with two nodes,
-  /// namely node \f$ u_{in} \f$ and node \f$ u_{out} \f$.
-  /// If there is a \f$ (v, u) \f$ arc in the original digraph, then the
-  /// new target of the arc will be \f$ u_{in} \f$ and similarly the
-  /// source of each original \f$ (u, v) \f$ arc will be \f$ u_{out} \f$.
-  /// The adaptor adds an additional \e bind \e arc from \f$ u_{in} \f$
-  /// to \f$ u_{out} \f$ for each node \f$ u \f$ of the original digraph.
-  ///
-  /// The aim of this class is running an algorithm with respect to node
-  /// costs or capacities if the algorithm considers only arc costs or
-  /// capacities directly.
-  /// In this case you can use \c SplitNodes adaptor, and set the node
-  /// costs/capacities of the original digraph to the \e bind \e arcs
-  /// in the adaptor.
-  ///
-  /// \tparam GR The type of the adapted digraph.
-  /// It must conform to the \ref concepts::Digraph "Digraph" concept.
-  /// It is implicitly \c const.
-  ///
-  /// \note The \c Node type of this adaptor is converible to the \c Node
-  /// type of the adapted digraph.
-  template <typename GR>
-#ifdef DOXYGEN
-  class SplitNodes {
-#else
+  /// \brief Split the nodes of a directed graph
+  ///
+  /// The SplitNodes adaptor splits each node into an in-node and an
+  /// out-node. Formaly, the adaptor replaces each \f$ u \f$ node in
+  /// the digraph with two nodes(namely node \f$ u_{in} \f$ and node
+  /// \f$ u_{out} \f$). If there is a \f$ (v, u) \f$ arc in the
+  /// original digraph the new target of the arc will be \f$ u_{in} \f$
+  /// and similarly the source of the original \f$ (u, v) \f$ arc
+  /// will be \f$ u_{out} \f$.  The adaptor will add for each node in
+  /// the original digraph an additional arc which connects
+  /// \f$ (u_{in}, u_{out}) \f$.
+  ///
+  /// The aim of this class is to run algorithm with node costs if the
+  /// algorithm can use directly just arc costs. In this case we should use
+  /// a \c SplitNodes and set the node cost of the graph to the
+  /// bind arc in the adapted graph.
+  ///
+  /// \tparam _Digraph It must be conform to the \ref concepts::Digraph
+  /// "Digraph concept". The type can be specified to be const.
+  template <typename _Digraph>
   class SplitNodes
-    : public DigraphAdaptorExtender<SplitNodesBase<const GR> > {
-#endif
-  public:
-    typedef GR Digraph;
-    typedef DigraphAdaptorExtender<SplitNodesBase<const GR> > Parent;
+    : public DigraphAdaptorExtender<SplitNodesBase<_Digraph> > {
+  public:
+    typedef _Digraph Digraph;
+    typedef DigraphAdaptorExtender<SplitNodesBase<Digraph> > Parent;
 
     typedef typename Digraph::Node DigraphNode;
@@ -3346,99 +3096,98 @@
     typedef typename Parent::Arc Arc;
 
-    /// \brief Constructor
+    /// \brief Constructor of the adaptor.
     ///
     /// Constructor of the adaptor.
-    SplitNodes(const Digraph& g) {
+    SplitNodes(Digraph& g) {
       Parent::setDigraph(g);
     }
 
-    /// \brief Returns \c true if the given node is an in-node.
-    ///
-    /// Returns \c true if the given node is an in-node.
+    /// \brief Returns true when the node is in-node.
+    ///
+    /// Returns true when the node is in-node.
     static bool inNode(const Node& n) {
       return Parent::inNode(n);
     }
 
-    /// \brief Returns \c true if the given node is an out-node.
-    ///
-    /// Returns \c true if the given node is an out-node.
+    /// \brief Returns true when the node is out-node.
+    ///
+    /// Returns true when the node is out-node.
     static bool outNode(const Node& n) {
       return Parent::outNode(n);
     }
 
-    /// \brief Returns \c true if the given arc is an original arc.
-    ///
-    /// Returns \c true if the given arc is one of the arcs in the
-    /// original digraph.
+    /// \brief Returns true when the arc is arc in the original digraph.
+    ///
+    /// Returns true when the arc is arc in the original digraph.
     static bool origArc(const Arc& a) {
       return Parent::origArc(a);
     }
 
-    /// \brief Returns \c true if the given arc is a bind arc.
-    ///
-    /// Returns \c true if the given arc is a bind arc, i.e. it connects
-    /// an in-node and an out-node.
+    /// \brief Returns true when the arc binds an in-node and an out-node.
+    ///
+    /// Returns true when the arc binds an in-node and an out-node.
     static bool bindArc(const Arc& a) {
       return Parent::bindArc(a);
     }
 
-    /// \brief Returns the in-node created from the given original node.
-    ///
-    /// Returns the in-node created from the given original node.
+    /// \brief Gives back the in-node created from the \c node.
+    ///
+    /// Gives back the in-node created from the \c node.
     static Node inNode(const DigraphNode& n) {
       return Parent::inNode(n);
     }
 
-    /// \brief Returns the out-node created from the given original node.
-    ///
-    /// Returns the out-node created from the given original node.
+    /// \brief Gives back the out-node created from the \c node.
+    ///
+    /// Gives back the out-node created from the \c node.
     static Node outNode(const DigraphNode& n) {
       return Parent::outNode(n);
     }
 
-    /// \brief Returns the bind arc that corresponds to the given
-    /// original node.
-    ///
-    /// Returns the bind arc in the adaptor that corresponds to the given
-    /// original node, i.e. the arc connecting the in-node and out-node
-    /// of \c n.
+    /// \brief Gives back the arc binds the two part of the node.
+    ///
+    /// Gives back the arc binds the two part of the node.
     static Arc arc(const DigraphNode& n) {
       return Parent::arc(n);
     }
 
-    /// \brief Returns the arc that corresponds to the given original arc.
-    ///
-    /// Returns the arc in the adaptor that corresponds to the given
-    /// original arc.
+    /// \brief Gives back the arc of the original arc.
+    ///
+    /// Gives back the arc of the original arc.
     static Arc arc(const DigraphArc& a) {
       return Parent::arc(a);
     }
 
-    /// \brief Node map combined from two original node maps
-    ///
-    /// This map adaptor class adapts two node maps of the original digraph
-    /// to get a node map of the split digraph.
-    /// Its value type is inherited from the first node map type
-    /// (\c InNodeMap).
+    /// \brief NodeMap combined from two original NodeMap
+    ///
+    /// This class adapt two of the original digraph NodeMap to
+    /// get a node map on the adapted digraph.
     template <typename InNodeMap, typename OutNodeMap>
     class CombinedNodeMap {
     public:
 
-      /// The key type of the map
       typedef Node Key;
-      /// The value type of the map
       typedef typename InNodeMap::Value Value;
 
-      typedef typename MapTraits<InNodeMap>::ReferenceMapTag ReferenceMapTag;
-      typedef typename MapTraits<InNodeMap>::ReturnValue ReturnValue;
-      typedef typename MapTraits<InNodeMap>::ConstReturnValue ConstReturnValue;
-      typedef typename MapTraits<InNodeMap>::ReturnValue Reference;
-      typedef typename MapTraits<InNodeMap>::ConstReturnValue ConstReference;
-
-      /// Constructor
+      /// \brief Constructor
+      ///
+      /// Constructor.
       CombinedNodeMap(InNodeMap& in_map, OutNodeMap& out_map)
         : _in_map(in_map), _out_map(out_map) {}
 
-      /// Returns the value associated with the given key.
+      /// \brief The subscript operator.
+      ///
+      /// The subscript operator.
+      Value& operator[](const Key& key) {
+        if (Parent::inNode(key)) {
+          return _in_map[key];
+        } else {
+          return _out_map[key];
+        }
+      }
+
+      /// \brief The const subscript operator.
+      ///
+      /// The const subscript operator.
       Value operator[](const Key& key) const {
         if (Parent::inNode(key)) {
@@ -3449,14 +3198,7 @@
       }
 
-      /// Returns a reference to the value associated with the given key.
-      Value& operator[](const Key& key) {
-        if (Parent::inNode(key)) {
-          return _in_map[key];
-        } else {
-          return _out_map[key];
-        }
-      }
-
-      /// Sets the value associated with the given key.
+      /// \brief The setter function of the map.
+      ///
+      /// The setter function of the map.
       void set(const Key& key, const Value& value) {
         if (Parent::inNode(key)) {
@@ -3475,7 +3217,7 @@
 
 
-    /// \brief Returns a combined node map
-    ///
-    /// This function just returns a combined node map.
+    /// \brief Just gives back a combined node map
+    ///
+    /// Just gives back a combined node map
     template <typename InNodeMap, typename OutNodeMap>
     static CombinedNodeMap<InNodeMap, OutNodeMap>
@@ -3503,31 +3245,35 @@
     }
 
-    /// \brief Arc map combined from an arc map and a node map of the
-    /// original digraph.
-    ///
-    /// This map adaptor class adapts an arc map and a node map of the
-    /// original digraph to get an arc map of the split digraph.
-    /// Its value type is inherited from the original arc map type
-    /// (\c ArcMap).
-    template <typename ArcMap, typename NodeMap>
+    /// \brief ArcMap combined from an original ArcMap and a NodeMap
+    ///
+    /// This class adapt an original ArcMap and a NodeMap to get an
+    /// arc map on the adapted digraph
+    template <typename DigraphArcMap, typename DigraphNodeMap>
     class CombinedArcMap {
     public:
 
-      /// The key type of the map
       typedef Arc Key;
-      /// The value type of the map
-      typedef typename ArcMap::Value Value;
-
-      typedef typename MapTraits<ArcMap>::ReferenceMapTag ReferenceMapTag;
-      typedef typename MapTraits<ArcMap>::ReturnValue ReturnValue;
-      typedef typename MapTraits<ArcMap>::ConstReturnValue ConstReturnValue;
-      typedef typename MapTraits<ArcMap>::ReturnValue Reference;
-      typedef typename MapTraits<ArcMap>::ConstReturnValue ConstReference;
-
-      /// Constructor
-      CombinedArcMap(ArcMap& arc_map, NodeMap& node_map)
+      typedef typename DigraphArcMap::Value Value;
+
+      /// \brief Constructor
+      ///
+      /// Constructor.
+      CombinedArcMap(DigraphArcMap& arc_map, DigraphNodeMap& node_map)
         : _arc_map(arc_map), _node_map(node_map) {}
 
-      /// Returns the value associated with the given key.
+      /// \brief The subscript operator.
+      ///
+      /// The subscript operator.
+      void set(const Arc& arc, const Value& val) {
+        if (Parent::origArc(arc)) {
+          _arc_map.set(arc, val);
+        } else {
+          _node_map.set(arc, val);
+        }
+      }
+
+      /// \brief The const subscript operator.
+      ///
+      /// The const subscript operator.
       Value operator[](const Key& arc) const {
         if (Parent::origArc(arc)) {
@@ -3538,5 +3284,7 @@
       }
 
-      /// Returns a reference to the value associated with the given key.
+      /// \brief The const subscript operator.
+      ///
+      /// The const subscript operator.
       Value& operator[](const Key& arc) {
         if (Parent::origArc(arc)) {
@@ -3547,58 +3295,52 @@
       }
 
-      /// Sets the value associated with the given key.
-      void set(const Arc& arc, const Value& val) {
-        if (Parent::origArc(arc)) {
-          _arc_map.set(arc, val);
-        } else {
-          _node_map.set(arc, val);
-        }
-      }
-
     private:
-      ArcMap& _arc_map;
-      NodeMap& _node_map;
+      DigraphArcMap& _arc_map;
+      DigraphNodeMap& _node_map;
     };
 
-    /// \brief Returns a combined arc map
-    ///
-    /// This function just returns a combined arc map.
-    template <typename ArcMap, typename NodeMap>
-    static CombinedArcMap<ArcMap, NodeMap>
-    combinedArcMap(ArcMap& arc_map, NodeMap& node_map) {
-      return CombinedArcMap<ArcMap, NodeMap>(arc_map, node_map);
-    }
-
-    template <typename ArcMap, typename NodeMap>
-    static CombinedArcMap<const ArcMap, NodeMap>
-    combinedArcMap(const ArcMap& arc_map, NodeMap& node_map) {
-      return CombinedArcMap<const ArcMap, NodeMap>(arc_map, node_map);
-    }
-
-    template <typename ArcMap, typename NodeMap>
-    static CombinedArcMap<ArcMap, const NodeMap>
-    combinedArcMap(ArcMap& arc_map, const NodeMap& node_map) {
-      return CombinedArcMap<ArcMap, const NodeMap>(arc_map, node_map);
-    }
-
-    template <typename ArcMap, typename NodeMap>
-    static CombinedArcMap<const ArcMap, const NodeMap>
-    combinedArcMap(const ArcMap& arc_map, const NodeMap& node_map) {
-      return CombinedArcMap<const ArcMap, const NodeMap>(arc_map, node_map);
+    /// \brief Just gives back a combined arc map
+    ///
+    /// Just gives back a combined arc map
+    template <typename DigraphArcMap, typename DigraphNodeMap>
+    static CombinedArcMap<DigraphArcMap, DigraphNodeMap>
+    combinedArcMap(DigraphArcMap& arc_map, DigraphNodeMap& node_map) {
+      return CombinedArcMap<DigraphArcMap, DigraphNodeMap>(arc_map, node_map);
+    }
+
+    template <typename DigraphArcMap, typename DigraphNodeMap>
+    static CombinedArcMap<const DigraphArcMap, DigraphNodeMap>
+    combinedArcMap(const DigraphArcMap& arc_map, DigraphNodeMap& node_map) {
+      return CombinedArcMap<const DigraphArcMap,
+        DigraphNodeMap>(arc_map, node_map);
+    }
+
+    template <typename DigraphArcMap, typename DigraphNodeMap>
+    static CombinedArcMap<DigraphArcMap, const DigraphNodeMap>
+    combinedArcMap(DigraphArcMap& arc_map, const DigraphNodeMap& node_map) {
+      return CombinedArcMap<DigraphArcMap,
+        const DigraphNodeMap>(arc_map, node_map);
+    }
+
+    template <typename DigraphArcMap, typename DigraphNodeMap>
+    static CombinedArcMap<const DigraphArcMap, const DigraphNodeMap>
+    combinedArcMap(const DigraphArcMap& arc_map,
+                   const DigraphNodeMap& node_map) {
+      return CombinedArcMap<const DigraphArcMap,
+        const DigraphNodeMap>(arc_map, node_map);
     }
 
   };
 
-  /// \brief Returns a (read-only) SplitNodes adaptor
-  ///
-  /// This function just returns a (read-only) \ref SplitNodes adaptor.
-  /// \ingroup graph_adaptors
-  /// \relates SplitNodes
-  template<typename GR>
-  SplitNodes<GR>
-  splitNodes(const GR& digraph) {
-    return SplitNodes<GR>(digraph);
+  /// \brief Just gives back a node splitter
+  ///
+  /// Just gives back a node splitter
+  template<typename Digraph>
+  SplitNodes<Digraph>
+  splitNodes(const Digraph& digraph) {
+    return SplitNodes<Digraph>(digraph);
   }
 
+
 } //namespace lemon
 
Index: lemon/arg_parser.cc
===================================================================
--- lemon/arg_parser.cc	(revision 440)
+++ lemon/arg_parser.cc	(revision 311)
@@ -3,5 +3,5 @@
  * This file is a part of LEMON, a generic C++ optimization library.
  *
- * Copyright (C) 2003-2009
+ * Copyright (C) 2003-2008
  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
  * (Egervary Research Group on Combinatorial Optimization, EGRES).
Index: lemon/arg_parser.h
===================================================================
--- lemon/arg_parser.h	(revision 440)
+++ lemon/arg_parser.h	(revision 311)
@@ -3,5 +3,5 @@
  * This file is a part of LEMON, a generic C++ optimization library.
  *
- * Copyright (C) 2003-2009
+ * Copyright (C) 2003-2008
  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
  * (Egervary Research Group on Combinatorial Optimization, EGRES).
Index: lemon/assert.h
===================================================================
--- lemon/assert.h	(revision 440)
+++ lemon/assert.h	(revision 290)
@@ -3,5 +3,5 @@
  * This file is a part of LEMON, a generic C++ optimization library.
  *
- * Copyright (C) 2003-2009
+ * Copyright (C) 2003-2008
  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
  * (Egervary Research Group on Combinatorial Optimization, EGRES).
Index: lemon/base.cc
===================================================================
--- lemon/base.cc	(revision 440)
+++ lemon/base.cc	(revision 220)
@@ -3,5 +3,5 @@
  * This file is a part of LEMON, a generic C++ optimization library.
  *
- * Copyright (C) 2003-2009
+ * Copyright (C) 2003-2008
  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
  * (Egervary Research Group on Combinatorial Optimization, EGRES).
Index: lemon/bfs.h
===================================================================
--- lemon/bfs.h	(revision 440)
+++ lemon/bfs.h	(revision 420)
@@ -3,5 +3,5 @@
  * This file is a part of LEMON, a generic C++ optimization library.
  *
- * Copyright (C) 2003-2009
+ * Copyright (C) 2003-2008
  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
  * (Egervary Research Group on Combinatorial Optimization, EGRES).
Index: lemon/bin_heap.h
===================================================================
--- lemon/bin_heap.h	(revision 440)
+++ lemon/bin_heap.h	(revision 209)
@@ -3,5 +3,5 @@
  * This file is a part of LEMON, a generic C++ optimization library.
  *
- * Copyright (C) 2003-2009
+ * Copyright (C) 2003-2008
  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
  * (Egervary Research Group on Combinatorial Optimization, EGRES).
Index: lemon/bits/alteration_notifier.h
===================================================================
--- lemon/bits/alteration_notifier.h	(revision 440)
+++ lemon/bits/alteration_notifier.h	(revision 361)
@@ -3,5 +3,5 @@
  * This file is a part of LEMON, a generic C++ optimization library.
  *
- * Copyright (C) 2003-2009
+ * Copyright (C) 2003-2008
  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
  * (Egervary Research Group on Combinatorial Optimization, EGRES).
Index: lemon/bits/array_map.h
===================================================================
--- lemon/bits/array_map.h	(revision 440)
+++ lemon/bits/array_map.h	(revision 361)
@@ -3,5 +3,5 @@
  * This file is a part of LEMON, a generic C++ optimization library.
  *
- * Copyright (C) 2003-2009
+ * Copyright (C) 2003-2008
  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
  * (Egervary Research Group on Combinatorial Optimization, EGRES).
Index: lemon/bits/base_extender.h
===================================================================
--- lemon/bits/base_extender.h	(revision 440)
+++ lemon/bits/base_extender.h	(revision 361)
@@ -3,5 +3,5 @@
  * This file is a part of LEMON, a generic C++ optimization library.
  *
- * Copyright (C) 2003-2009
+ * Copyright (C) 2003-2008
  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
  * (Egervary Research Group on Combinatorial Optimization, EGRES).
Index: lemon/bits/bezier.h
===================================================================
--- lemon/bits/bezier.h	(revision 440)
+++ lemon/bits/bezier.h	(revision 314)
@@ -3,5 +3,5 @@
  * This file is a part of LEMON, a generic C++ optimization library.
  *
- * Copyright (C) 2003-2009
+ * Copyright (C) 2003-2008
  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
  * (Egervary Research Group on Combinatorial Optimization, EGRES).
Index: lemon/bits/default_map.h
===================================================================
--- lemon/bits/default_map.h	(revision 440)
+++ lemon/bits/default_map.h	(revision 314)
@@ -3,5 +3,5 @@
  * This file is a part of LEMON, a generic C++ optimization library.
  *
- * Copyright (C) 2003-2009
+ * Copyright (C) 2003-2008
  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
  * (Egervary Research Group on Combinatorial Optimization, EGRES).
Index: lemon/bits/edge_set_extender.h
===================================================================
--- lemon/bits/edge_set_extender.h	(revision 468)
+++ lemon/bits/edge_set_extender.h	(revision 468)
@@ -0,0 +1,628 @@
+/* -*- C++ -*-
+ *
+ * This file is a part of LEMON, a generic C++ optimization library
+ *
+ * Copyright (C) 2003-2008
+ * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
+ * (Egervary Research Group on Combinatorial Optimization, EGRES).
+ *
+ * Permission to use, modify and distribute this software is granted
+ * provided that this copyright notice appears in all copies. For
+ * precise terms see the accompanying LICENSE file.
+ *
+ * This software is provided "AS IS" with no warranty of any kind,
+ * express or implied, and with no claim as to its suitability for any
+ * purpose.
+ *
+ */
+
+#ifndef LEMON_BITS_EDGE_SET_EXTENDER_H
+#define LEMON_BITS_EDGE_SET_EXTENDER_H
+
+#include <lemon/error.h>
+#include <lemon/bits/default_map.h>
+
+///\ingroup digraphbits
+///\file
+///\brief Extenders for the arc set types
+namespace lemon {
+
+  /// \ingroup digraphbits
+  ///
+  /// \brief Extender for the ArcSets
+  template <typename Base>
+  class ArcSetExtender : public Base {
+  public:
+
+    typedef Base Parent;
+    typedef ArcSetExtender Digraph;
+
+    // Base extensions
+
+    typedef typename Parent::Node Node;
+    typedef typename Parent::Arc Arc;
+
+    int maxId(Node) const {
+      return Parent::maxNodeId();
+    }
+
+    int maxId(Arc) const {
+      return Parent::maxArcId();
+    }
+
+    Node fromId(int id, Node) const {
+      return Parent::nodeFromId(id);
+    }
+
+    Arc fromId(int id, Arc) const {
+      return Parent::arcFromId(id);
+    }
+
+    Node oppositeNode(const Node &n, const Arc &e) const {
+      if (n == Parent::source(e))
+	return Parent::target(e);
+      else if(n==Parent::target(e))
+	return Parent::source(e);
+      else
+	return INVALID;
+    }
+
+
+    // Alteration notifier extensions
+
+    /// The arc observer registry.
+    typedef AlterationNotifier<ArcSetExtender, Arc> ArcNotifier;
+
+  protected:
+
+    mutable ArcNotifier arc_notifier;
+
+  public:
+
+    using Parent::notifier;
+
+    /// \brief Gives back the arc alteration notifier.
+    ///
+    /// Gives back the arc alteration notifier.
+    ArcNotifier& notifier(Arc) const {
+      return arc_notifier;
+    }
+
+    // Iterable extensions
+
+    class NodeIt : public Node { 
+      const Digraph* digraph;
+    public:
+
+      NodeIt() {}
+
+      NodeIt(Invalid i) : Node(i) { }
+
+      explicit NodeIt(const Digraph& _graph) : digraph(&_graph) {
+	_graph.first(static_cast<Node&>(*this));
+      }
+
+      NodeIt(const Digraph& _graph, const Node& node) 
+	: Node(node), digraph(&_graph) {}
+
+      NodeIt& operator++() { 
+	digraph->next(*this);
+	return *this; 
+      }
+
+    };
+
+
+    class ArcIt : public Arc { 
+      const Digraph* digraph;
+    public:
+
+      ArcIt() { }
+
+      ArcIt(Invalid i) : Arc(i) { }
+
+      explicit ArcIt(const Digraph& _graph) : digraph(&_graph) {
+	_graph.first(static_cast<Arc&>(*this));
+      }
+
+      ArcIt(const Digraph& _graph, const Arc& e) : 
+	Arc(e), digraph(&_graph) { }
+
+      ArcIt& operator++() { 
+	digraph->next(*this);
+	return *this; 
+      }
+
+    };
+
+
+    class OutArcIt : public Arc { 
+      const Digraph* digraph;
+    public:
+
+      OutArcIt() { }
+
+      OutArcIt(Invalid i) : Arc(i) { }
+
+      OutArcIt(const Digraph& _graph, const Node& node) 
+	: digraph(&_graph) {
+	_graph.firstOut(*this, node);
+      }
+
+      OutArcIt(const Digraph& _graph, const Arc& arc) 
+	: Arc(arc), digraph(&_graph) {}
+
+      OutArcIt& operator++() { 
+	digraph->nextOut(*this);
+	return *this; 
+      }
+
+    };
+
+
+    class InArcIt : public Arc { 
+      const Digraph* digraph;
+    public:
+
+      InArcIt() { }
+
+      InArcIt(Invalid i) : Arc(i) { }
+
+      InArcIt(const Digraph& _graph, const Node& node) 
+	: digraph(&_graph) {
+	_graph.firstIn(*this, node);
+      }
+
+      InArcIt(const Digraph& _graph, const Arc& arc) : 
+	Arc(arc), digraph(&_graph) {}
+
+      InArcIt& operator++() { 
+	digraph->nextIn(*this);
+	return *this; 
+      }
+
+    };
+
+    /// \brief Base node of the iterator
+    ///
+    /// Returns the base node (ie. the source in this case) of the iterator
+    Node baseNode(const OutArcIt &e) const {
+      return Parent::source(static_cast<const Arc&>(e));
+    }
+    /// \brief Running node of the iterator
+    ///
+    /// Returns the running node (ie. the target in this case) of the
+    /// iterator
+    Node runningNode(const OutArcIt &e) const {
+      return Parent::target(static_cast<const Arc&>(e));
+    }
+
+    /// \brief Base node of the iterator
+    ///
+    /// Returns the base node (ie. the target in this case) of the iterator
+    Node baseNode(const InArcIt &e) const {
+      return Parent::target(static_cast<const Arc&>(e));
+    }
+    /// \brief Running node of the iterator
+    ///
+    /// Returns the running node (ie. the source in this case) of the
+    /// iterator
+    Node runningNode(const InArcIt &e) const {
+      return Parent::source(static_cast<const Arc&>(e));
+    }
+
+    using Parent::first;
+
+    // Mappable extension
+    
+    template <typename _Value>
+    class ArcMap 
+      : public MapExtender<DefaultMap<Digraph, Arc, _Value> > {
+    public:
+      typedef ArcSetExtender Digraph;
+      typedef MapExtender<DefaultMap<Digraph, Arc, _Value> > Parent;
+
+      explicit ArcMap(const Digraph& _g) 
+	: Parent(_g) {}
+      ArcMap(const Digraph& _g, const _Value& _v) 
+	: Parent(_g, _v) {}
+
+      ArcMap& operator=(const ArcMap& cmap) {
+	return operator=<ArcMap>(cmap);
+      }
+
+      template <typename CMap>
+      ArcMap& operator=(const CMap& cmap) {
+        Parent::operator=(cmap);
+	return *this;
+      }
+
+    };
+
+
+    // Alteration extension
+
+    Arc addArc(const Node& from, const Node& to) {
+      Arc arc = Parent::addArc(from, to);
+      notifier(Arc()).add(arc);
+      return arc;
+    }
+    
+    void clear() {
+      notifier(Arc()).clear();
+      Parent::clear();
+    }
+
+    void erase(const Arc& arc) {
+      notifier(Arc()).erase(arc);
+      Parent::erase(arc);
+    }
+
+    ArcSetExtender() {
+      arc_notifier.setContainer(*this);
+    }
+
+    ~ArcSetExtender() {
+      arc_notifier.clear();
+    }
+
+  };
+
+
+  /// \ingroup digraphbits
+  ///
+  /// \brief Extender for the EdgeSets
+  template <typename Base>
+  class EdgeSetExtender : public Base {
+
+  public:
+
+    typedef Base Parent;
+    typedef EdgeSetExtender Digraph;
+
+    typedef typename Parent::Node Node;
+    typedef typename Parent::Arc Arc;
+    typedef typename Parent::Edge Edge;
+
+
+    int maxId(Node) const {
+      return Parent::maxNodeId();
+    }
+
+    int maxId(Arc) const {
+      return Parent::maxArcId();
+    }
+
+    int maxId(Edge) const {
+      return Parent::maxEdgeId();
+    }
+
+    Node fromId(int id, Node) const {
+      return Parent::nodeFromId(id);
+    }
+
+    Arc fromId(int id, Arc) const {
+      return Parent::arcFromId(id);
+    }
+
+    Edge fromId(int id, Edge) const {
+      return Parent::edgeFromId(id);
+    }
+
+    Node oppositeNode(const Node &n, const Edge &e) const {
+      if( n == Parent::u(e))
+	return Parent::v(e);
+      else if( n == Parent::v(e))
+	return Parent::u(e);
+      else
+	return INVALID;
+    }
+
+    Arc oppositeArc(const Arc &e) const {
+      return Parent::direct(e, !Parent::direction(e));
+    }
+
+    using Parent::direct;
+    Arc direct(const Edge &e, const Node &s) const {
+      return Parent::direct(e, Parent::u(e) == s);
+    }
+
+    typedef AlterationNotifier<EdgeSetExtender, Arc> ArcNotifier;
+    typedef AlterationNotifier<EdgeSetExtender, Edge> EdgeNotifier;
+
+
+  protected:
+
+    mutable ArcNotifier arc_notifier;
+    mutable EdgeNotifier edge_notifier;
+
+  public:
+
+    using Parent::notifier;
+    
+    ArcNotifier& notifier(Arc) const {
+      return arc_notifier;
+    }
+
+    EdgeNotifier& notifier(Edge) const {
+      return edge_notifier;
+    }
+
+
+    class NodeIt : public Node { 
+      const Digraph* digraph;
+    public:
+
+      NodeIt() {}
+
+      NodeIt(Invalid i) : Node(i) { }
+
+      explicit NodeIt(const Digraph& _graph) : digraph(&_graph) {
+	_graph.first(static_cast<Node&>(*this));
+      }
+
+      NodeIt(const Digraph& _graph, const Node& node) 
+	: Node(node), digraph(&_graph) {}
+
+      NodeIt& operator++() { 
+	digraph->next(*this);
+	return *this; 
+      }
+
+    };
+
+
+    class ArcIt : public Arc { 
+      const Digraph* digraph;
+    public:
+
+      ArcIt() { }
+
+      ArcIt(Invalid i) : Arc(i) { }
+
+      explicit ArcIt(const Digraph& _graph) : digraph(&_graph) {
+	_graph.first(static_cast<Arc&>(*this));
+      }
+
+      ArcIt(const Digraph& _graph, const Arc& e) : 
+	Arc(e), digraph(&_graph) { }
+
+      ArcIt& operator++() { 
+	digraph->next(*this);
+	return *this; 
+      }
+
+    };
+
+
+    class OutArcIt : public Arc { 
+      const Digraph* digraph;
+    public:
+
+      OutArcIt() { }
+
+      OutArcIt(Invalid i) : Arc(i) { }
+
+      OutArcIt(const Digraph& _graph, const Node& node) 
+	: digraph(&_graph) {
+	_graph.firstOut(*this, node);
+      }
+
+      OutArcIt(const Digraph& _graph, const Arc& arc) 
+	: Arc(arc), digraph(&_graph) {}
+
+      OutArcIt& operator++() { 
+	digraph->nextOut(*this);
+	return *this; 
+      }
+
+    };
+
+
+    class InArcIt : public Arc { 
+      const Digraph* digraph;
+    public:
+
+      InArcIt() { }
+
+      InArcIt(Invalid i) : Arc(i) { }
+
+      InArcIt(const Digraph& _graph, const Node& node) 
+	: digraph(&_graph) {
+	_graph.firstIn(*this, node);
+      }
+
+      InArcIt(const Digraph& _graph, const Arc& arc) : 
+	Arc(arc), digraph(&_graph) {}
+
+      InArcIt& operator++() { 
+	digraph->nextIn(*this);
+	return *this; 
+      }
+
+    };
+
+
+    class EdgeIt : public Parent::Edge { 
+      const Digraph* digraph;
+    public:
+
+      EdgeIt() { }
+
+      EdgeIt(Invalid i) : Edge(i) { }
+
+      explicit EdgeIt(const Digraph& _graph) : digraph(&_graph) {
+	_graph.first(static_cast<Edge&>(*this));
+      }
+
+      EdgeIt(const Digraph& _graph, const Edge& e) : 
+	Edge(e), digraph(&_graph) { }
+
+      EdgeIt& operator++() { 
+	digraph->next(*this);
+	return *this; 
+      }
+
+    };
+
+    class IncEdgeIt : public Parent::Edge {
+      friend class EdgeSetExtender;
+      const Digraph* digraph;
+      bool direction;
+    public:
+
+      IncEdgeIt() { }
+
+      IncEdgeIt(Invalid i) : Edge(i), direction(false) { }
+
+      IncEdgeIt(const Digraph& _graph, const Node &n) : digraph(&_graph) {
+	_graph.firstInc(*this, direction, n);
+      }
+
+      IncEdgeIt(const Digraph& _graph, const Edge &ue, const Node &n)
+	: digraph(&_graph), Edge(ue) {
+	direction = (_graph.source(ue) == n);
+      }
+
+      IncEdgeIt& operator++() {
+	digraph->nextInc(*this, direction);
+	return *this; 
+      }
+    };
+
+    /// \brief Base node of the iterator
+    ///
+    /// Returns the base node (ie. the source in this case) of the iterator
+    Node baseNode(const OutArcIt &e) const {
+      return Parent::source(static_cast<const Arc&>(e));
+    }
+    /// \brief Running node of the iterator
+    ///
+    /// Returns the running node (ie. the target in this case) of the
+    /// iterator
+    Node runningNode(const OutArcIt &e) const {
+      return Parent::target(static_cast<const Arc&>(e));
+    }
+
+    /// \brief Base node of the iterator
+    ///
+    /// Returns the base node (ie. the target in this case) of the iterator
+    Node baseNode(const InArcIt &e) const {
+      return Parent::target(static_cast<const Arc&>(e));
+    }
+    /// \brief Running node of the iterator
+    ///
+    /// Returns the running node (ie. the source in this case) of the
+    /// iterator
+    Node runningNode(const InArcIt &e) const {
+      return Parent::source(static_cast<const Arc&>(e));
+    }
+
+    /// Base node of the iterator
+    ///
+    /// Returns the base node of the iterator
+    Node baseNode(const IncEdgeIt &e) const {
+      return e.direction ? u(e) : v(e);
+    }
+    /// Running node of the iterator
+    ///
+    /// Returns the running node of the iterator
+    Node runningNode(const IncEdgeIt &e) const {
+      return e.direction ? v(e) : u(e);
+    }
+
+
+    template <typename _Value>
+    class ArcMap 
+      : public MapExtender<DefaultMap<Digraph, Arc, _Value> > {
+    public:
+      typedef EdgeSetExtender Digraph;
+      typedef MapExtender<DefaultMap<Digraph, Arc, _Value> > Parent;
+
+      ArcMap(const Digraph& _g) 
+	: Parent(_g) {}
+      ArcMap(const Digraph& _g, const _Value& _v) 
+	: Parent(_g, _v) {}
+
+      ArcMap& operator=(const ArcMap& cmap) {
+	return operator=<ArcMap>(cmap);
+      }
+
+      template <typename CMap>
+      ArcMap& operator=(const CMap& cmap) {
+        Parent::operator=(cmap);
+	return *this;
+      }
+
+    };
+
+
+    template <typename _Value>
+    class EdgeMap 
+      : public MapExtender<DefaultMap<Digraph, Edge, _Value> > {
+    public:
+      typedef EdgeSetExtender Digraph;
+      typedef MapExtender<DefaultMap<Digraph, Edge, _Value> > Parent;
+
+      EdgeMap(const Digraph& _g) 
+	: Parent(_g) {}
+
+      EdgeMap(const Digraph& _g, const _Value& _v) 
+	: Parent(_g, _v) {}
+
+      EdgeMap& operator=(const EdgeMap& cmap) {
+	return operator=<EdgeMap>(cmap);
+      }
+
+      template <typename CMap>
+      EdgeMap& operator=(const CMap& cmap) {
+        Parent::operator=(cmap);
+	return *this;
+      }
+
+    };
+
+
+    // Alteration extension
+
+    Edge addEdge(const Node& from, const Node& to) {
+      Edge edge = Parent::addEdge(from, to);
+      notifier(Edge()).add(edge);
+      std::vector<Arc> arcs;
+      arcs.push_back(Parent::direct(edge, true));
+      arcs.push_back(Parent::direct(edge, false));
+      notifier(Arc()).add(arcs);
+      return edge;
+    }
+    
+    void clear() {
+      notifier(Arc()).clear();
+      notifier(Edge()).clear();
+      Parent::clear();
+    }
+
+    void erase(const Edge& edge) {
+      std::vector<Arc> arcs;
+      arcs.push_back(Parent::direct(edge, true));
+      arcs.push_back(Parent::direct(edge, false));
+      notifier(Arc()).erase(arcs);
+      notifier(Edge()).erase(edge);
+      Parent::erase(edge);
+    }
+
+
+    EdgeSetExtender() {
+      arc_notifier.setContainer(*this);
+      edge_notifier.setContainer(*this);
+    }
+
+    ~EdgeSetExtender() {
+      edge_notifier.clear();
+      arc_notifier.clear();
+    }
+    
+  };
+
+}
+
+#endif
Index: lemon/bits/enable_if.h
===================================================================
--- lemon/bits/enable_if.h	(revision 440)
+++ lemon/bits/enable_if.h	(revision 314)
@@ -3,5 +3,5 @@
  * This file is a part of LEMON, a generic C++ optimization library.
  *
- * Copyright (C) 2003-2009
+ * Copyright (C) 2003-2008
  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
  * (Egervary Research Group on Combinatorial Optimization, EGRES).
Index: lemon/bits/graph_adaptor_extender.h
===================================================================
--- lemon/bits/graph_adaptor_extender.h	(revision 455)
+++ lemon/bits/graph_adaptor_extender.h	(revision 416)
@@ -3,5 +3,5 @@
  * This file is a part of LEMON, a generic C++ optimization library.
  *
- * Copyright (C) 2003-2009
+ * Copyright (C) 2003-2008
  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
  * (Egervary Research Group on Combinatorial Optimization, EGRES).
@@ -174,4 +174,8 @@
   };
 
+
+  /// \ingroup digraphbits
+  ///
+  /// \brief Extender for the GraphAdaptors
   template <typename _Graph>
   class GraphAdaptorExtender : public _Graph {
Index: lemon/bits/graph_extender.h
===================================================================
--- lemon/bits/graph_extender.h	(revision 440)
+++ lemon/bits/graph_extender.h	(revision 361)
@@ -3,5 +3,5 @@
  * This file is a part of LEMON, a generic C++ optimization library.
  *
- * Copyright (C) 2003-2009
+ * Copyright (C) 2003-2008
  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
  * (Egervary Research Group on Combinatorial Optimization, EGRES).
Index: lemon/bits/map_extender.h
===================================================================
--- lemon/bits/map_extender.h	(revision 440)
+++ lemon/bits/map_extender.h	(revision 314)
@@ -3,5 +3,5 @@
  * This file is a part of LEMON, a generic C++ optimization library.
  *
- * Copyright (C) 2003-2009
+ * Copyright (C) 2003-2008
  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
  * (Egervary Research Group on Combinatorial Optimization, EGRES).
Index: lemon/bits/path_dump.h
===================================================================
--- lemon/bits/path_dump.h	(revision 440)
+++ lemon/bits/path_dump.h	(revision 209)
@@ -3,5 +3,5 @@
  * This file is a part of LEMON, a generic C++ optimization library.
  *
- * Copyright (C) 2003-2009
+ * Copyright (C) 2003-2008
  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
  * (Egervary Research Group on Combinatorial Optimization, EGRES).
Index: lemon/bits/traits.h
===================================================================
--- lemon/bits/traits.h	(revision 440)
+++ lemon/bits/traits.h	(revision 360)
@@ -3,5 +3,5 @@
  * This file is a part of LEMON, a generic C++ optimization library.
  *
- * Copyright (C) 2003-2009
+ * Copyright (C) 2003-2008
  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
  * (Egervary Research Group on Combinatorial Optimization, EGRES).
Index: lemon/bits/variant.h
===================================================================
--- lemon/bits/variant.h	(revision 440)
+++ lemon/bits/variant.h	(revision 416)
@@ -3,5 +3,5 @@
  * This file is a part of LEMON, a generic C++ optimization library.
  *
- * Copyright (C) 2003-2009
+ * Copyright (C) 2003-2008
  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
  * (Egervary Research Group on Combinatorial Optimization, EGRES).
@@ -22,6 +22,6 @@
 #include <lemon/assert.h>
 
-// \file
-// \brief Variant types
+/// \file
+/// \brief Variant types
 
 namespace lemon {
@@ -37,25 +37,25 @@
 
 
-  // \brief Simple Variant type for two types
-  //
-  // Simple Variant type for two types. The Variant type is a type-safe
-  // union. C++ has strong limitations for using unions, for
-  // example you cannot store a type with non-default constructor or
-  // destructor in a union. This class always knowns the current
-  // state of the variant and it cares for the proper construction
-  // and destruction.
+  /// \brief Simple Variant type for two types
+  ///
+  /// Simple Variant type for two types. The Variant type is a type
+  /// safe union. The C++ has strong limitations for using unions, by
+  /// example we can not store type with non default constructor or
+  /// destructor in an union. This class always knowns the current
+  /// state of the variant and it cares for the proper construction
+  /// and destruction.
   template <typename _First, typename _Second>
   class BiVariant {
   public:
 
-    // \brief The \c First type.
+    /// \brief The \c First type.
     typedef _First First;
-    // \brief The \c Second type.
+    /// \brief The \c Second type.
     typedef _Second Second;
 
-    // \brief Constructor
-    //
-    // This constructor initalizes to the default value of the \c First
-    // type.
+    /// \brief Constructor
+    ///
+    /// This constructor initalizes to the default value of the \c First
+    /// type.
     BiVariant() {
       flag = true;
@@ -63,8 +63,8 @@
     }
 
-    // \brief Constructor
-    //
-    // This constructor initalizes to the given value of the \c First
-    // type.
+    /// \brief Constructor
+    ///
+    /// This constructor initalizes to the given value of the \c First
+    /// type.
     BiVariant(const First& f) {
       flag = true;
@@ -72,8 +72,8 @@
     }
 
-    // \brief Constructor
-    //
-    // This constructor initalizes to the given value of the \c
-    // Second type.
+    /// \brief Constructor
+    ///
+    /// This constructor initalizes to the given value of the \c
+    /// Second type.
     BiVariant(const Second& s) {
       flag = false;
@@ -81,7 +81,7 @@
     }
 
-    // \brief Copy constructor
-    //
-    // Copy constructor
+    /// \brief Copy constructor
+    ///
+    /// Copy constructor
     BiVariant(const BiVariant& bivariant) {
       flag = bivariant.flag;
@@ -93,15 +93,15 @@
     }
 
-    // \brief Destrcutor
-    //
-    // Destructor
+    /// \brief Destrcutor
+    ///
+    /// Destructor
     ~BiVariant() {
       destroy();
     }
 
-    // \brief Set to the default value of the \c First type.
-    //
-    // This function sets the variant to the default value of the \c
-    // First type.
+    /// \brief Set to the default value of the \c First type.
+    ///
+    /// This function sets the variant to the default value of the \c
+    /// First type.
     BiVariant& setFirst() {
       destroy();
@@ -111,8 +111,8 @@
     }
 
-    // \brief Set to the given value of the \c First type.
-    //
-    // This function sets the variant to the given value of the \c
-    // First type.
+    /// \brief Set to the given value of the \c First type.
+    ///
+    /// This function sets the variant to the given value of the \c
+    /// First type.
     BiVariant& setFirst(const First& f) {
       destroy();
@@ -122,8 +122,8 @@
     }
 
-    // \brief Set to the default value of the \c Second type.
-    //
-    // This function sets the variant to the default value of the \c
-    // Second type.
+    /// \brief Set to the default value of the \c Second type.
+    ///
+    /// This function sets the variant to the default value of the \c
+    /// Second type.
     BiVariant& setSecond() {
       destroy();
@@ -133,8 +133,8 @@
     }
 
-    // \brief Set to the given value of the \c Second type.
-    //
-    // This function sets the variant to the given value of the \c
-    // Second type.
+    /// \brief Set to the given value of the \c Second type.
+    ///
+    /// This function sets the variant to the given value of the \c
+    /// Second type.
     BiVariant& setSecond(const Second& s) {
       destroy();
@@ -144,15 +144,15 @@
     }
 
-    // \brief Operator form of the \c setFirst()
+    /// \brief Operator form of the \c setFirst()
     BiVariant& operator=(const First& f) {
       return setFirst(f);
     }
 
-    // \brief Operator form of the \c setSecond()
+    /// \brief Operator form of the \c setSecond()
     BiVariant& operator=(const Second& s) {
       return setSecond(s);
     }
 
-    // \brief Assign operator
+    /// \brief Assign operator
     BiVariant& operator=(const BiVariant& bivariant) {
       if (this == &bivariant) return *this;
@@ -167,58 +167,58 @@
     }
 
-    // \brief Reference to the value
-    //
-    // Reference to the value of the \c First type.
-    // \pre The BiVariant should store value of \c First type.
+    /// \brief Reference to the value
+    ///
+    /// Reference to the value of the \c First type.
+    /// \pre The BiVariant should store value of \c First type.
     First& first() {
       LEMON_DEBUG(flag, "Variant wrong state");
-      return *reinterpret_cast<First*>(data);
-    }
-
-    // \brief Const reference to the value
-    //
-    // Const reference to the value of the \c First type.
-    // \pre The BiVariant should store value of \c First type.
-    const First& first() const {
+      return *reinterpret_cast<First*>(data); 
+    }
+
+    /// \brief Const reference to the value
+    ///
+    /// Const reference to the value of the \c First type.
+    /// \pre The BiVariant should store value of \c First type.
+    const First& first() const { 
       LEMON_DEBUG(flag, "Variant wrong state");
-      return *reinterpret_cast<const First*>(data);
-    }
-
-    // \brief Operator form of the \c first()
+      return *reinterpret_cast<const First*>(data); 
+    }
+
+    /// \brief Operator form of the \c first()
     operator First&() { return first(); }
-    // \brief Operator form of the const \c first()
+    /// \brief Operator form of the const \c first()
     operator const First&() const { return first(); }
 
-    // \brief Reference to the value
-    //
-    // Reference to the value of the \c Second type.
-    // \pre The BiVariant should store value of \c Second type.
-    Second& second() {
+    /// \brief Reference to the value
+    ///
+    /// Reference to the value of the \c Second type.
+    /// \pre The BiVariant should store value of \c Second type.
+    Second& second() { 
       LEMON_DEBUG(!flag, "Variant wrong state");
-      return *reinterpret_cast<Second*>(data);
-    }
-
-    // \brief Const reference to the value
-    //
-    // Const reference to the value of the \c Second type.
-    // \pre The BiVariant should store value of \c Second type.
-    const Second& second() const {
+      return *reinterpret_cast<Second*>(data); 
+    }
+
+    /// \brief Const reference to the value
+    ///
+    /// Const reference to the value of the \c Second type.
+    /// \pre The BiVariant should store value of \c Second type.
+    const Second& second() const { 
       LEMON_DEBUG(!flag, "Variant wrong state");
-      return *reinterpret_cast<const Second*>(data);
-    }
-
-    // \brief Operator form of the \c second()
+      return *reinterpret_cast<const Second*>(data); 
+    }
+
+    /// \brief Operator form of the \c second()
     operator Second&() { return second(); }
-    // \brief Operator form of the const \c second()
+    /// \brief Operator form of the const \c second()
     operator const Second&() const { return second(); }
 
-    // \brief %True when the variant is in the first state
-    //
-    // %True when the variant stores value of the \c First type.
+    /// \brief %True when the variant is in the first state
+    ///
+    /// %True when the variant stores value of the \c First type.
     bool firstState() const { return flag; }
 
-    // \brief %True when the variant is in the second state
-    //
-    // %True when the variant stores value of the \c Second type.
+    /// \brief %True when the variant is in the second state
+    ///
+    /// %True when the variant stores value of the \c Second type.
     bool secondState() const { return !flag; }
 
@@ -290,38 +290,38 @@
   }
 
-  // \brief Variant type
-  //
-  // Simple Variant type. The Variant type is a type-safe union.
-  // C++ has strong limitations for using unions, for example you
-  // cannot store type with non-default constructor or destructor in
-  // a union. This class always knowns the current state of the
-  // variant and it cares for the proper construction and
-  // destruction.
-  //
-  // \param _num The number of the types which can be stored in the
-  // variant type.
-  // \param _TypeMap This class describes the types of the Variant. The
-  // _TypeMap::Map<index>::Type should be a valid type for each index
-  // in the range {0, 1, ..., _num - 1}. The \c VariantTypeMap is helper
-  // class to define such type mappings up to 10 types.
-  //
-  // And the usage of the class:
-  //\code
-  // typedef Variant<3, VariantTypeMap<int, std::string, double> > MyVariant;
-  // MyVariant var;
-  // var.set<0>(12);
-  // std::cout << var.get<0>() << std::endl;
-  // var.set<1>("alpha");
-  // std::cout << var.get<1>() << std::endl;
-  // var.set<2>(0.75);
-  // std::cout << var.get<2>() << std::endl;
-  //\endcode
-  //
-  // The result of course:
-  //\code
-  // 12
-  // alpha
-  // 0.75
-  //\endcode
+  /// \brief Variant type
+  ///
+  /// Simple Variant type. The Variant type is a type safe union. The
+  /// C++ has strong limitations for using unions, for example we
+  /// cannot store type with non default constructor or destructor in
+  /// a union. This class always knowns the current state of the
+  /// variant and it cares for the proper construction and
+  /// destruction.
+  ///
+  /// \param _num The number of the types which can be stored in the
+  /// variant type.
+  /// \param _TypeMap This class describes the types of the Variant. The
+  /// _TypeMap::Map<index>::Type should be a valid type for each index
+  /// in the range {0, 1, ..., _num - 1}. The \c VariantTypeMap is helper
+  /// class to define such type mappings up to 10 types.
+  ///
+  /// And the usage of the class:
+  ///\code
+  /// typedef Variant<3, VariantTypeMap<int, std::string, double> > MyVariant;
+  /// MyVariant var;
+  /// var.set<0>(12);
+  /// std::cout << var.get<0>() << std::endl;
+  /// var.set<1>("alpha");
+  /// std::cout << var.get<1>() << std::endl;
+  /// var.set<2>(0.75);
+  /// std::cout << var.get<2>() << std::endl;
+  ///\endcode
+  ///
+  /// The result of course:
+  ///\code
+  /// 12
+  /// alpha
+  /// 0.75
+  ///\endcode
   template <int _num, typename _TypeMap>
   class Variant {
@@ -332,8 +332,8 @@
     typedef _TypeMap TypeMap;
 
-    // \brief Constructor
-    //
-    // This constructor initalizes to the default value of the \c type
-    // with 0 index.
+    /// \brief Constructor
+    ///
+    /// This constructor initalizes to the default value of the \c type
+    /// with 0 index.
     Variant() {
       flag = 0;
@@ -343,7 +343,7 @@
 
 
-    // \brief Copy constructor
-    //
-    // Copy constructor
+    /// \brief Copy constructor
+    ///
+    /// Copy constructor
     Variant(const Variant& variant) {
       flag = variant.flag;
@@ -351,7 +351,7 @@
     }
 
-    // \brief Assign operator
-    //
-    // Assign operator
+    /// \brief Assign operator
+    ///
+    /// Assign operator
     Variant& operator=(const Variant& variant) {
       if (this == &variant) return *this;
@@ -364,15 +364,15 @@
     }
 
-    // \brief Destrcutor
-    //
-    // Destructor
+    /// \brief Destrcutor
+    ///
+    /// Destructor
     ~Variant() {
       _variant_bits::Memory<num - 1, TypeMap>::destroy(flag, data);
     }
 
-    // \brief Set to the default value of the type with \c _idx index.
-    //
-    // This function sets the variant to the default value of the
-    // type with \c _idx index.
+    /// \brief Set to the default value of the type with \c _idx index.
+    ///
+    /// This function sets the variant to the default value of the
+    /// type with \c _idx index.
     template <int _idx>
     Variant& set() {
@@ -384,8 +384,8 @@
     }
 
-    // \brief Set to the given value of the type with \c _idx index.
-    //
-    // This function sets the variant to the given value of the type
-    // with \c _idx index.
+    /// \brief Set to the given value of the type with \c _idx index.
+    ///
+    /// This function sets the variant to the given value of the type
+    /// with \c _idx index.
     template <int _idx>
     Variant& set(const typename _TypeMap::template Map<_idx>::Type& init) {
@@ -397,7 +397,7 @@
     }
 
-    // \brief Gets the current value of the type with \c _idx index.
-    //
-    // Gets the current value of the type with \c _idx index.
+    /// \brief Gets the current value of the type with \c _idx index.
+    ///
+    /// Gets the current value of the type with \c _idx index.
     template <int _idx>
     const typename TypeMap::template Map<_idx>::Type& get() const {
@@ -407,7 +407,7 @@
     }
 
-    // \brief Gets the current value of the type with \c _idx index.
-    //
-    // Gets the current value of the type with \c _idx index.
+    /// \brief Gets the current value of the type with \c _idx index.
+    ///
+    /// Gets the current value of the type with \c _idx index.
     template <int _idx>
     typename _TypeMap::template Map<_idx>::Type& get() {
@@ -417,7 +417,7 @@
     }
 
-    // \brief Returns the current state of the variant.
-    //
-    // Returns the current state of the variant.
+    /// \brief Returns the current state of the variant.
+    ///
+    /// Returns the current state of the variant.
     int state() const {
       return flag;
@@ -451,5 +451,5 @@
 
     template <int _idx, typename _T0, typename _T1, typename _T2,
-              typename _T3, typename _T4, typename _T5, typename _T6,
+              typename _T3, typename _T5, typename _T4, typename _T6,
               typename _T7, typename _T8, typename _T9>
     struct Mapper {
@@ -470,13 +470,13 @@
   }
 
-  // \brief Helper class for Variant
-  //
-  // Helper class to define type mappings for Variant. This class
-  // converts the template parameters to be mappable by integer.
-  // \see Variant
+  /// \brief Helper class for Variant
+  ///
+  /// Helper class to define type mappings for Variant. This class
+  /// converts the template parameters to be mappable by integer.
+  /// \see Variant
   template <
     typename _T0,
     typename _T1 = void, typename _T2 = void, typename _T3 = void,
-    typename _T4 = void, typename _T5 = void, typename _T6 = void,
+    typename _T5 = void, typename _T4 = void, typename _T6 = void,
     typename _T7 = void, typename _T8 = void, typename _T9 = void>
   struct VariantTypeMap {
Index: lemon/bits/vector_map.h
===================================================================
--- lemon/bits/vector_map.h	(revision 440)
+++ lemon/bits/vector_map.h	(revision 361)
@@ -3,5 +3,5 @@
  * This file is a part of LEMON, a generic C++ optimization library.
  *
- * Copyright (C) 2003-2009
+ * Copyright (C) 2003-2008
  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
  * (Egervary Research Group on Combinatorial Optimization, EGRES).
Index: lemon/circulation.h
===================================================================
--- lemon/circulation.h	(revision 440)
+++ lemon/circulation.h	(revision 420)
@@ -3,5 +3,5 @@
  * This file is a part of LEMON, a generic C++ optimization library.
  *
- * Copyright (C) 2003-2009
+ * Copyright (C) 2003-2008
  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
  * (Egervary Research Group on Combinatorial Optimization, EGRES).
Index: lemon/color.cc
===================================================================
--- lemon/color.cc	(revision 440)
+++ lemon/color.cc	(revision 209)
@@ -3,5 +3,5 @@
  * This file is a part of LEMON, a generic C++ optimization library.
  *
- * Copyright (C) 2003-2009
+ * Copyright (C) 2003-2008
  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
  * (Egervary Research Group on Combinatorial Optimization, EGRES).
Index: lemon/color.h
===================================================================
--- lemon/color.h	(revision 440)
+++ lemon/color.h	(revision 313)
@@ -3,5 +3,5 @@
  * This file is a part of LEMON, a generic C++ optimization library.
  *
- * Copyright (C) 2003-2009
+ * Copyright (C) 2003-2008
  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
  * (Egervary Research Group on Combinatorial Optimization, EGRES).
Index: lemon/concept_check.h
===================================================================
--- lemon/concept_check.h	(revision 440)
+++ lemon/concept_check.h	(revision 285)
@@ -3,5 +3,5 @@
  * This file is a part of LEMON, a generic C++ optimization library.
  *
- * Copyright (C) 2003-2009
+ * Copyright (C) 2003-2008
  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
  * (Egervary Research Group on Combinatorial Optimization, EGRES).
Index: lemon/concepts/digraph.h
===================================================================
--- lemon/concepts/digraph.h	(revision 440)
+++ lemon/concepts/digraph.h	(revision 263)
@@ -3,5 +3,5 @@
  * This file is a part of LEMON, a generic C++ optimization library.
  *
- * Copyright (C) 2003-2009
+ * Copyright (C) 2003-2008
  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
  * (Egervary Research Group on Combinatorial Optimization, EGRES).
Index: lemon/concepts/graph.h
===================================================================
--- lemon/concepts/graph.h	(revision 440)
+++ lemon/concepts/graph.h	(revision 263)
@@ -3,5 +3,5 @@
  * This file is a part of LEMON, a generic C++ optimization library.
  *
- * Copyright (C) 2003-2009
+ * Copyright (C) 2003-2008
  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
  * (Egervary Research Group on Combinatorial Optimization, EGRES).
Index: lemon/concepts/graph_components.h
===================================================================
--- lemon/concepts/graph_components.h	(revision 440)
+++ lemon/concepts/graph_components.h	(revision 313)
@@ -3,5 +3,5 @@
  * This file is a part of LEMON, a generic C++ optimization library.
  *
- * Copyright (C) 2003-2009
+ * Copyright (C) 2003-2008
  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
  * (Egervary Research Group on Combinatorial Optimization, EGRES).
Index: lemon/concepts/heap.h
===================================================================
--- lemon/concepts/heap.h	(revision 440)
+++ lemon/concepts/heap.h	(revision 290)
@@ -3,5 +3,5 @@
  * This file is a part of LEMON, a generic C++ optimization library.
  *
- * Copyright (C) 2003-2009
+ * Copyright (C) 2003-2008
  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
  * (Egervary Research Group on Combinatorial Optimization, EGRES).
Index: lemon/concepts/maps.h
===================================================================
--- lemon/concepts/maps.h	(revision 440)
+++ lemon/concepts/maps.h	(revision 314)
@@ -3,5 +3,5 @@
  * This file is a part of LEMON, a generic C++ optimization library.
  *
- * Copyright (C) 2003-2009
+ * Copyright (C) 2003-2008
  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
  * (Egervary Research Group on Combinatorial Optimization, EGRES).
Index: lemon/concepts/path.h
===================================================================
--- lemon/concepts/path.h	(revision 440)
+++ lemon/concepts/path.h	(revision 281)
@@ -3,5 +3,5 @@
  * This file is a part of LEMON, a generic C++ optimization library.
  *
- * Copyright (C) 2003-2009
+ * Copyright (C) 2003-2008
  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
  * (Egervary Research Group on Combinatorial Optimization, EGRES).
Index: lemon/connectivity.h
===================================================================
--- lemon/connectivity.h	(revision 440)
+++ lemon/connectivity.h	(revision 419)
@@ -3,5 +3,5 @@
  * This file is a part of LEMON, a generic C++ optimization library.
  *
- * Copyright (C) 2003-2009
+ * Copyright (C) 2003-2008
  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
  * (Egervary Research Group on Combinatorial Optimization, EGRES).
@@ -296,5 +296,5 @@
   /// direction.
   ///
-  /// \param digraph The graph.
+  /// \param graph The graph.
   /// \return The number of components
   /// \note By definition, the empty graph has zero
@@ -1226,5 +1226,5 @@
   /// that the given graph is DAG.
   ///
-  /// \param digraph The graph. It must be directed and acyclic.
+  /// \param graph The graph. It must be directed and acyclic.
   /// \retval order A readable - writable node map. The values will be set
   /// from 0 to the number of the nodes in the graph minus one. Each values
Index: lemon/core.h
===================================================================
--- lemon/core.h	(revision 440)
+++ lemon/core.h	(revision 319)
@@ -3,5 +3,5 @@
  * This file is a part of LEMON, a generic C++ optimization library.
  *
- * Copyright (C) 2003-2009
+ * Copyright (C) 2003-2008
  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
  * (Egervary Research Group on Combinatorial Optimization, EGRES).
@@ -1171,6 +1171,6 @@
     /// Construct a new ConEdgeIt iterating on the edges that
     /// connects nodes \c u and \c v.
-    ConEdgeIt(const Graph& g, Node u, Node v) : _graph(g), _u(u), _v(v) {
-      Parent::operator=(findEdge(_graph, _u, _v));
+    ConEdgeIt(const Graph& g, Node u, Node v) : _graph(g) {
+      Parent::operator=(findEdge(_graph, u, v));
     }
 
@@ -1184,10 +1184,10 @@
     /// It increments the iterator and gives back the next edge.
     ConEdgeIt& operator++() {
-      Parent::operator=(findEdge(_graph, _u, _v, *this));
+      Parent::operator=(findEdge(_graph, _graph.u(*this),
+                                 _graph.v(*this), *this));
       return *this;
     }
   private:
     const Graph& _graph;
-    Node _u, _v;
   };
 
Index: lemon/counter.h
===================================================================
--- lemon/counter.h	(revision 440)
+++ lemon/counter.h	(revision 209)
@@ -3,5 +3,5 @@
  * This file is a part of LEMON, a generic C++ optimization library.
  *
- * Copyright (C) 2003-2009
+ * Copyright (C) 2003-2008
  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
  * (Egervary Research Group on Combinatorial Optimization, EGRES).
Index: lemon/dfs.h
===================================================================
--- lemon/dfs.h	(revision 440)
+++ lemon/dfs.h	(revision 421)
@@ -3,5 +3,5 @@
  * This file is a part of LEMON, a generic C++ optimization library.
  *
- * Copyright (C) 2003-2009
+ * Copyright (C) 2003-2008
  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
  * (Egervary Research Group on Combinatorial Optimization, EGRES).
Index: lemon/dijkstra.h
===================================================================
--- lemon/dijkstra.h	(revision 440)
+++ lemon/dijkstra.h	(revision 408)
@@ -3,5 +3,5 @@
  * This file is a part of LEMON, a generic C++ optimization library.
  *
- * Copyright (C) 2003-2009
+ * Copyright (C) 2003-2008
  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
  * (Egervary Research Group on Combinatorial Optimization, EGRES).
Index: lemon/dim2.h
===================================================================
--- lemon/dim2.h	(revision 440)
+++ lemon/dim2.h	(revision 314)
@@ -3,5 +3,5 @@
  * This file is a part of LEMON, a generic C++ optimization library.
  *
- * Copyright (C) 2003-2009
+ * Copyright (C) 2003-2008
  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
  * (Egervary Research Group on Combinatorial Optimization, EGRES).
Index: lemon/dimacs.h
===================================================================
--- lemon/dimacs.h	(revision 440)
+++ lemon/dimacs.h	(revision 388)
@@ -3,5 +3,5 @@
  * This file is a part of LEMON, a generic C++ optimization library.
  *
- * Copyright (C) 2003-2009
+ * Copyright (C) 2003-2008
  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
  * (Egervary Research Group on Combinatorial Optimization, EGRES).
@@ -335,5 +335,5 @@
     typedef typename Digraph::ArcIt ArcIt;
 
-    if(!comment.empty())
+    if(!comment.empty()) 
       os << "c " << comment << std::endl;
     os << "p mat " << g.nodeNum() << " " << g.arcNum() << std::endl;
Index: lemon/edge_set.h
===================================================================
--- lemon/edge_set.h	(revision 468)
+++ lemon/edge_set.h	(revision 468)
@@ -0,0 +1,1410 @@
+/* -*- mode: C++; indent-tabs-mode: nil; -*-
+ *
+ * This file is a part of LEMON, a generic C++ optimization library.
+ *
+ * Copyright (C) 2003-2008
+ * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
+ * (Egervary Research Group on Combinatorial Optimization, EGRES).
+ *
+ * Permission to use, modify and distribute this software is granted
+ * provided that this copyright notice appears in all copies. For
+ * precise terms see the accompanying LICENSE file.
+ *
+ * This software is provided "AS IS" with no warranty of any kind,
+ * express or implied, and with no claim as to its suitability for any
+ * purpose.
+ *
+ */
+
+#ifndef LEMON_EDGE_SET_H
+#define LEMON_EDGE_SET_H
+
+#include <lemon/core.h>
+#include <lemon/bits/edge_set_extender.h>
+
+/// \ingroup semi_adaptors
+/// \file
+/// \brief ArcSet and EdgeSet classes.
+///
+/// Graphs which use another graph's node-set as own.
+namespace lemon {
+
+  template <typename _Graph>
+  class ListArcSetBase {
+  public:
+
+    typedef _Graph Graph;
+    typedef typename Graph::Node Node;
+    typedef typename Graph::NodeIt NodeIt;
+
+  protected:
+
+    struct NodeT {
+      int first_out, first_in;
+      NodeT() : first_out(-1), first_in(-1) {}
+    };
+
+    typedef typename ItemSetTraits<Graph, Node>::
+    template Map<NodeT>::Type NodesImplBase;
+
+    NodesImplBase* nodes;
+
+    struct ArcT {
+      Node source, target;
+      int next_out, next_in;
+      int prev_out, prev_in;
+      ArcT() : prev_out(-1), prev_in(-1) {}
+    };
+
+    std::vector<ArcT> arcs;
+
+    int first_arc;
+    int first_free_arc;
+
+    const Graph* graph;
+
+    void initalize(const Graph& _graph, NodesImplBase& _nodes) {
+      graph = &_graph;
+      nodes = &_nodes;
+    }
+
+  public:
+
+    class Arc {
+      friend class ListArcSetBase<Graph>;
+    protected:
+      Arc(int _id) : id(_id) {}
+      int id;
+    public:
+      Arc() {}
+      Arc(Invalid) : id(-1) {}
+      bool operator==(const Arc& arc) const { return id == arc.id; }
+      bool operator!=(const Arc& arc) const { return id != arc.id; }
+      bool operator<(const Arc& arc) const { return id < arc.id; }
+    };
+
+    ListArcSetBase() : first_arc(-1), first_free_arc(-1) {}
+
+    Arc addArc(const Node& u, const Node& v) {
+      int n;
+      if (first_free_arc == -1) {
+        n = arcs.size();
+        arcs.push_back(ArcT());
+      } else {
+        n = first_free_arc;
+        first_free_arc = arcs[first_free_arc].next_in;
+      }
+      arcs[n].next_in = (*nodes)[v].first_in;
+      if ((*nodes)[v].first_in != -1) {
+        arcs[(*nodes)[v].first_in].prev_in = n;
+      }
+      (*nodes)[v].first_in = n;
+      arcs[n].next_out = (*nodes)[u].first_out;
+      if ((*nodes)[u].first_out != -1) {
+        arcs[(*nodes)[u].first_out].prev_out = n;
+      }
+      (*nodes)[u].first_out = n;
+      arcs[n].source = u;
+      arcs[n].target = v;
+      return Arc(n);
+    }
+
+    void erase(const Arc& arc) {
+      int n = arc.id;
+      if (arcs[n].prev_in != -1) {
+        arcs[arcs[n].prev_in].next_in = arcs[n].next_in;
+      } else {
+        (*nodes)[arcs[n].target].first_in = arcs[n].next_in;
+      }
+      if (arcs[n].next_in != -1) {
+        arcs[arcs[n].next_in].prev_in = arcs[n].prev_in;
+      }
+
+      if (arcs[n].prev_out != -1) {
+        arcs[arcs[n].prev_out].next_out = arcs[n].next_out;
+      } else {
+        (*nodes)[arcs[n].source].first_out = arcs[n].next_out;
+      }
+      if (arcs[n].next_out != -1) {
+        arcs[arcs[n].next_out].prev_out = arcs[n].prev_out;
+      }
+
+    }
+
+    void clear() {
+      Node node;
+      for (first(node); node != INVALID; next(node)) {
+        (*nodes)[node].first_in = -1;
+        (*nodes)[node].first_out = -1;
+      }
+      arcs.clear();
+      first_arc = -1;
+      first_free_arc = -1;
+    }
+
+    void first(Node& node) const {
+      graph->first(node);
+    }
+
+    void next(Node& node) const {
+      graph->next(node);
+    }
+
+    void first(Arc& arc) const {
+      Node node;
+      first(node);
+      while (node != INVALID && (*nodes)[node].first_in == -1) {
+        next(node);
+      }
+      arc.id = (node == INVALID) ? -1 : (*nodes)[node].first_in;
+    }
+
+    void next(Arc& arc) const {
+      if (arcs[arc.id].next_in != -1) {
+        arc.id = arcs[arc.id].next_in;
+      } else {
+        Node node = arcs[arc.id].target;
+        next(node);
+        while (node != INVALID && (*nodes)[node].first_in == -1) {
+          next(node);
+        }
+        arc.id = (node == INVALID) ? -1 : (*nodes)[node].first_in;
+      }
+    }
+
+    void firstOut(Arc& arc, const Node& node) const {
+      arc.id = (*nodes)[node].first_out;
+    }
+
+    void nextOut(Arc& arc) const {
+      arc.id = arcs[arc.id].next_out;
+    }
+
+    void firstIn(Arc& arc, const Node& node) const {
+      arc.id = (*nodes)[node].first_in;
+    }
+
+    void nextIn(Arc& arc) const {
+      arc.id = arcs[arc.id].next_in;
+    }
+
+    int id(const Node& node) const { return graph->id(node); }
+    int id(const Arc& arc) const { return arc.id; }
+
+    Node nodeFromId(int ix) const { return graph->nodeFromId(ix); }
+    Arc arcFromId(int ix) const { return Arc(ix); }
+
+    int maxNodeId() const { return graph->maxNodeId(); };
+    int maxArcId() const { return arcs.size() - 1; }
+
+    Node source(const Arc& arc) const { return arcs[arc.id].source;}
+    Node target(const Arc& arc) const { return arcs[arc.id].target;}
+
+    typedef typename ItemSetTraits<Graph, Node>::ItemNotifier NodeNotifier;
+
+    NodeNotifier& notifier(Node) const {
+      return graph->notifier(Node());
+    }
+
+    template <typename _Value>
+    class NodeMap : public Graph::template NodeMap<_Value> {
+    public:
+
+      typedef typename _Graph::template NodeMap<_Value> Parent;
+
+      explicit NodeMap(const ListArcSetBase<Graph>& arcset)
+        : Parent(*arcset.graph) {}
+
+      NodeMap(const ListArcSetBase<Graph>& arcset, const _Value& value)
+        : Parent(*arcset.graph, value) {}
+
+      NodeMap& operator=(const NodeMap& cmap) {
+        return operator=<NodeMap>(cmap);
+      }
+
+      template <typename CMap>
+      NodeMap& operator=(const CMap& cmap) {
+        Parent::operator=(cmap);
+        return *this;
+      }
+    };
+
+  };
+
+  /// \ingroup semi_adaptors
+  ///
+  /// \brief Digraph using a node set of another digraph or graph and
+  /// an own arc set.
+  ///
+  /// This structure can be used to establish another directed graph
+  /// over a node set of an existing one. This class uses the same
+  /// Node type as the underlying graph, and each valid node of the
+  /// original graph is valid in this arc set, therefore the node
+  /// objects of the original graph can be used directly with this
+  /// class. The node handling functions (id handling, observing, and
+  /// iterators) works equivalently as in the original graph.
+  ///
+  /// This implementation is based on doubly-linked lists, from each
+  /// node the outgoing and the incoming arcs make up lists, therefore
+  /// one arc can be erased in constant time. It also makes possible,
+  /// that node can be removed from the underlying graph, in this case
+  /// all arcs incident to the given node is erased from the arc set.
+  ///
+  /// \param _Graph 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 is fully conform to the \ref concepts::Digraph
+  /// "Digraph" concept.
+  template <typename _Graph>
+  class ListArcSet : public ArcSetExtender<ListArcSetBase<_Graph> > {
+
+  public:
+
+    typedef ArcSetExtender<ListArcSetBase<_Graph> > Parent;
+
+    typedef typename Parent::Node Node;
+    typedef typename Parent::Arc Arc;
+
+    typedef _Graph Graph;
+
+
+    typedef typename Parent::NodesImplBase NodesImplBase;
+
+    void eraseNode(const Node& node) {
+      Arc arc;
+      Parent::firstOut(arc, node);
+      while (arc != INVALID ) {
+        erase(arc);
+        Parent::firstOut(arc, node);
+      }
+
+      Parent::firstIn(arc, node);
+      while (arc != INVALID ) {
+        erase(arc);
+        Parent::firstIn(arc, node);
+      }
+    }
+
+    void clearNodes() {
+      Parent::clear();
+    }
+
+    class NodesImpl : public NodesImplBase {
+    public:
+      typedef NodesImplBase Parent;
+
+      NodesImpl(const Graph& graph, ListArcSet& arcset)
+        : Parent(graph), _arcset(arcset) {}
+
+      virtual ~NodesImpl() {}
+
+    protected:
+
+      virtual void erase(const Node& node) {
+        _arcset.eraseNode(node);
+        Parent::erase(node);
+      }
+      virtual void erase(const std::vector<Node>& nodes) {
+        for (int i = 0; i < int(nodes.size()); ++i) {
+          _arcset.eraseNode(nodes[i]);
+        }
+        Parent::erase(nodes);
+      }
+      virtual void clear() {
+        _arcset.clearNodes();
+        Parent::clear();
+      }
+
+    private:
+      ListArcSet& _arcset;
+    };
+
+    NodesImpl nodes;
+
+  public:
+
+    /// \brief Constructor of the ArcSet.
+    ///
+    /// Constructor of the ArcSet.
+    ListArcSet(const Graph& graph) : nodes(graph, *this) {
+      Parent::initalize(graph, nodes);
+    }
+
+    /// \brief Add a new arc to the digraph.
+    ///
+    /// Add a new arc to the digraph with source node \c s
+    /// and target node \c t.
+    /// \return the new arc.
+    Arc addArc(const Node& s, const Node& t) {
+      return Parent::addArc(s, t);
+    }
+
+    /// \brief Erase an arc from the digraph.
+    ///
+    /// Erase an arc \c a from the digraph.
+    void erase(const Arc& a) {
+      return Parent::erase(a);
+    }
+
+  };
+
+  template <typename _Graph>
+  class ListEdgeSetBase {
+  public:
+
+    typedef _Graph Graph;
+    typedef typename Graph::Node Node;
+    typedef typename Graph::NodeIt NodeIt;
+
+  protected:
+
+    struct NodeT {
+      int first_out;
+      NodeT() : first_out(-1) {}
+    };
+
+    typedef typename ItemSetTraits<Graph, Node>::
+    template Map<NodeT>::Type NodesImplBase;
+
+    NodesImplBase* nodes;
+
+    struct ArcT {
+      Node target;
+      int prev_out, next_out;
+      ArcT() : prev_out(-1), next_out(-1) {}
+    };
+
+    std::vector<ArcT> arcs;
+
+    int first_arc;
+    int first_free_arc;
+
+    const Graph* graph;
+
+    void initalize(const Graph& _graph, NodesImplBase& _nodes) {
+      graph = &_graph;
+      nodes = &_nodes;
+    }
+
+  public:
+
+    class Edge {
+      friend class ListEdgeSetBase;
+    protected:
+
+      int id;
+      explicit Edge(int _id) { id = _id;}
+
+    public:
+      Edge() {}
+      Edge (Invalid) { id = -1; }
+      bool operator==(const Edge& arc) const {return id == arc.id;}
+      bool operator!=(const Edge& arc) const {return id != arc.id;}
+      bool operator<(const Edge& arc) const {return id < arc.id;}
+    };
+
+    class Arc {
+      friend class ListEdgeSetBase;
+    protected:
+      Arc(int _id) : id(_id) {}
+      int id;
+    public:
+      operator Edge() const { return edgeFromId(id / 2); }
+
+      Arc() {}
+      Arc(Invalid) : id(-1) {}
+      bool operator==(const Arc& arc) const { return id == arc.id; }
+      bool operator!=(const Arc& arc) const { return id != arc.id; }
+      bool operator<(const Arc& arc) const { return id < arc.id; }
+    };
+
+    ListEdgeSetBase() : first_arc(-1), first_free_arc(-1) {}
+
+    Edge addEdge(const Node& u, const Node& v) {
+      int n;
+
+      if (first_free_arc == -1) {
+        n = arcs.size();
+        arcs.push_back(ArcT());
+        arcs.push_back(ArcT());
+      } else {
+        n = first_free_arc;
+        first_free_arc = arcs[n].next_out;
+      }
+
+      arcs[n].target = u;
+      arcs[n | 1].target = v;
+
+      arcs[n].next_out = (*nodes)[v].first_out;
+      if ((*nodes)[v].first_out != -1) {
+        arcs[(*nodes)[v].first_out].prev_out = n;
+      }
+      (*nodes)[v].first_out = n;
+      arcs[n].prev_out = -1;
+
+      if ((*nodes)[u].first_out != -1) {
+        arcs[(*nodes)[u].first_out].prev_out = (n | 1);
+      }
+      arcs[n | 1].next_out = (*nodes)[u].first_out;
+      (*nodes)[u].first_out = (n | 1);
+      arcs[n | 1].prev_out = -1;
+
+      return Edge(n / 2);
+    }
+
+    void erase(const Edge& arc) {
+      int n = arc.id * 2;
+
+      if (arcs[n].next_out != -1) {
+        arcs[arcs[n].next_out].prev_out = arcs[n].prev_out;
+      }
+
+      if (arcs[n].prev_out != -1) {
+        arcs[arcs[n].prev_out].next_out = arcs[n].next_out;
+      } else {
+        (*nodes)[arcs[n | 1].target].first_out = arcs[n].next_out;
+      }
+
+      if (arcs[n | 1].next_out != -1) {
+        arcs[arcs[n | 1].next_out].prev_out = arcs[n | 1].prev_out;
+      }
+
+      if (arcs[n | 1].prev_out != -1) {
+        arcs[arcs[n | 1].prev_out].next_out = arcs[n | 1].next_out;
+      } else {
+        (*nodes)[arcs[n].target].first_out = arcs[n | 1].next_out;
+      }
+
+      arcs[n].next_out = first_free_arc;
+      first_free_arc = n;
+
+    }
+
+    void clear() {
+      Node node;
+      for (first(node); node != INVALID; next(node)) {
+        (*nodes)[node].first_out = -1;
+      }
+      arcs.clear();
+      first_arc = -1;
+      first_free_arc = -1;
+    }
+
+    void first(Node& node) const {
+      graph->first(node);
+    }
+
+    void next(Node& node) const {
+      graph->next(node);
+    }
+
+    void first(Arc& arc) const {
+      Node node;
+      first(node);
+      while (node != INVALID && (*nodes)[node].first_out == -1) {
+        next(node);
+      }
+      arc.id = (node == INVALID) ? -1 : (*nodes)[node].first_out;
+    }
+
+    void next(Arc& arc) const {
+      if (arcs[arc.id].next_out != -1) {
+        arc.id = arcs[arc.id].next_out;
+      } else {
+        Node node = arcs[arc.id ^ 1].target;
+        next(node);
+        while(node != INVALID && (*nodes)[node].first_out == -1) {
+          next(node);
+        }
+        arc.id = (node == INVALID) ? -1 : (*nodes)[node].first_out;
+      }
+    }
+
+    void first(Edge& edge) const {
+      Node node;
+      first(node);
+      while (node != INVALID) {
+        edge.id = (*nodes)[node].first_out;
+        while ((edge.id & 1) != 1) {
+          edge.id = arcs[edge.id].next_out;
+        }
+        if (edge.id != -1) {
+          edge.id /= 2;
+          return;
+        }
+        next(node);
+      }
+      edge.id = -1;
+    }
+
+    void next(Edge& edge) const {
+      Node node = arcs[edge.id * 2].target;
+      edge.id = arcs[(edge.id * 2) | 1].next_out;
+      while ((edge.id & 1) != 1) {
+        edge.id = arcs[edge.id].next_out;
+      }
+      if (edge.id != -1) {
+        edge.id /= 2;
+        return;
+      }
+      next(node);
+      while (node != INVALID) {
+        edge.id = (*nodes)[node].first_out;
+        while ((edge.id & 1) != 1) {
+          edge.id = arcs[edge.id].next_out;
+        }
+        if (edge.id != -1) {
+          edge.id /= 2;
+          return;
+        }
+        next(node);
+      }
+      edge.id = -1;
+    }
+
+    void firstOut(Arc& arc, const Node& node) const {
+      arc.id = (*nodes)[node].first_out;
+    }
+
+    void nextOut(Arc& arc) const {
+      arc.id = arcs[arc.id].next_out;
+    }
+
+    void firstIn(Arc& arc, const Node& node) const {
+      arc.id = (((*nodes)[node].first_out) ^ 1);
+      if (arc.id == -2) arc.id = -1;
+    }
+
+    void nextIn(Arc& arc) const {
+      arc.id = ((arcs[arc.id ^ 1].next_out) ^ 1);
+      if (arc.id == -2) arc.id = -1;
+    }
+
+    void firstInc(Edge &arc, bool& dir, const Node& node) const {
+      int de = (*nodes)[node].first_out;
+      if (de != -1 ) {
+        arc.id = de / 2;
+        dir = ((de & 1) == 1);
+      } else {
+        arc.id = -1;
+        dir = true;
+      }
+    }
+    void nextInc(Edge &arc, bool& dir) const {
+      int de = (arcs[(arc.id * 2) | (dir ? 1 : 0)].next_out);
+      if (de != -1 ) {
+        arc.id = de / 2;
+        dir = ((de & 1) == 1);
+      } else {
+        arc.id = -1;
+        dir = true;
+      }
+    }
+
+    static bool direction(Arc arc) {
+      return (arc.id & 1) == 1;
+    }
+
+    static Arc direct(Edge edge, bool dir) {
+      return Arc(edge.id * 2 + (dir ? 1 : 0));
+    }
+
+    int id(const Node& node) const { return graph->id(node); }
+    static int id(Arc e) { return e.id; }
+    static int id(Edge e) { return e.id; }
+
+    Node nodeFromId(int id) const { return graph->nodeFromId(id); }
+    static Arc arcFromId(int id) { return Arc(id);}
+    static Edge edgeFromId(int id) { return Edge(id);}
+
+    int maxNodeId() const { return graph->maxNodeId(); };
+    int maxEdgeId() const { return arcs.size() / 2 - 1; }
+    int maxArcId() const { return arcs.size()-1; }
+
+    Node source(Arc e) const { return arcs[e.id ^ 1].target; }
+    Node target(Arc e) const { return arcs[e.id].target; }
+
+    Node u(Edge e) const { return arcs[2 * e.id].target; }
+    Node v(Edge e) const { return arcs[2 * e.id + 1].target; }
+
+    typedef typename ItemSetTraits<Graph, Node>::ItemNotifier NodeNotifier;
+
+    NodeNotifier& notifier(Node) const {
+      return graph->notifier(Node());
+    }
+
+    template <typename _Value>
+    class NodeMap : public Graph::template NodeMap<_Value> {
+    public:
+
+      typedef typename _Graph::template NodeMap<_Value> Parent;
+
+      explicit NodeMap(const ListEdgeSetBase<Graph>& arcset)
+        : Parent(*arcset.graph) {}
+
+      NodeMap(const ListEdgeSetBase<Graph>& arcset, const _Value& value)
+        : Parent(*arcset.graph, value) {}
+
+      NodeMap& operator=(const NodeMap& cmap) {
+        return operator=<NodeMap>(cmap);
+      }
+
+      template <typename CMap>
+      NodeMap& operator=(const CMap& cmap) {
+        Parent::operator=(cmap);
+        return *this;
+      }
+    };
+
+  };
+
+  /// \ingroup semi_adaptors
+  ///
+  /// \brief Graph using a node set of another digraph or graph and an
+  /// own edge set.
+  ///
+  /// This structure can be used to establish another graph over a
+  /// node set of an existing one. This class uses the same Node type
+  /// as the underlying graph, and each valid node of the original
+  /// graph is valid in this arc set, therefore the node objects of
+  /// the original graph can be used directly with this class. The
+  /// node handling functions (id handling, observing, and iterators)
+  /// works equivalently as in the original graph.
+  ///
+  /// This implementation is based on doubly-linked lists, from each
+  /// node the incident edges make up lists, therefore one edge can be
+  /// erased in constant time. It also makes possible, that node can
+  /// be removed from the underlying graph, in this case all edges
+  /// incident to the given node is erased from the arc set.
+  ///
+  /// \param _Graph 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 is fully conform to the \ref concepts::Graph "Graph"
+  /// concept.
+  template <typename _Graph>
+  class ListEdgeSet : public EdgeSetExtender<ListEdgeSetBase<_Graph> > {
+
+  public:
+
+    typedef EdgeSetExtender<ListEdgeSetBase<_Graph> > Parent;
+
+    typedef typename Parent::Node Node;
+    typedef typename Parent::Arc Arc;
+    typedef typename Parent::Edge Edge;
+
+    typedef _Graph Graph;
+
+
+    typedef typename Parent::NodesImplBase NodesImplBase;
+
+    void eraseNode(const Node& node) {
+      Arc arc;
+      Parent::firstOut(arc, node);
+      while (arc != INVALID ) {
+        erase(arc);
+        Parent::firstOut(arc, node);
+      }
+
+    }
+
+    void clearNodes() {
+      Parent::clear();
+    }
+
+    class NodesImpl : public NodesImplBase {
+    public:
+      typedef NodesImplBase Parent;
+
+      NodesImpl(const Graph& graph, ListEdgeSet& arcset)
+        : Parent(graph), _arcset(arcset) {}
+
+      virtual ~NodesImpl() {}
+
+    protected:
+
+      virtual void erase(const Node& node) {
+        _arcset.eraseNode(node);
+        Parent::erase(node);
+      }
+      virtual void erase(const std::vector<Node>& nodes) {
+        for (int i = 0; i < int(nodes.size()); ++i) {
+          _arcset.eraseNode(nodes[i]);
+        }
+        Parent::erase(nodes);
+      }
+      virtual void clear() {
+        _arcset.clearNodes();
+        Parent::clear();
+      }
+
+    private:
+      ListEdgeSet& _arcset;
+    };
+
+    NodesImpl nodes;
+
+  public:
+
+    /// \brief Constructor of the EdgeSet.
+    ///
+    /// Constructor of the EdgeSet.
+    ListEdgeSet(const Graph& graph) : nodes(graph, *this) {
+      Parent::initalize(graph, nodes);
+    }
+
+    /// \brief Add a new edge to the graph.
+    ///
+    /// Add a new edge to the graph with node \c u
+    /// and node \c v endpoints.
+    /// \return the new edge.
+    Edge addEdge(const Node& u, const Node& v) {
+      return Parent::addEdge(u, v);
+    }
+
+    /// \brief Erase an edge from the graph.
+    ///
+    /// Erase the edge \c e from the graph.
+    void erase(const Edge& e) {
+      return Parent::erase(e);
+    }
+
+  };
+
+  template <typename _Graph>
+  class SmartArcSetBase {
+  public:
+
+    typedef _Graph Graph;
+    typedef typename Graph::Node Node;
+    typedef typename Graph::NodeIt NodeIt;
+
+  protected:
+
+    struct NodeT {
+      int first_out, first_in;
+      NodeT() : first_out(-1), first_in(-1) {}
+    };
+
+    typedef typename ItemSetTraits<Graph, Node>::
+    template Map<NodeT>::Type NodesImplBase;
+
+    NodesImplBase* nodes;
+
+    struct ArcT {
+      Node source, target;
+      int next_out, next_in;
+      ArcT() {}
+    };
+
+    std::vector<ArcT> arcs;
+
+    const Graph* graph;
+
+    void initalize(const Graph& _graph, NodesImplBase& _nodes) {
+      graph = &_graph;
+      nodes = &_nodes;
+    }
+
+  public:
+
+    class Arc {
+      friend class SmartArcSetBase<Graph>;
+    protected:
+      Arc(int _id) : id(_id) {}
+      int id;
+    public:
+      Arc() {}
+      Arc(Invalid) : id(-1) {}
+      bool operator==(const Arc& arc) const { return id == arc.id; }
+      bool operator!=(const Arc& arc) const { return id != arc.id; }
+      bool operator<(const Arc& arc) const { return id < arc.id; }
+    };
+
+    SmartArcSetBase() {}
+
+    Arc addArc(const Node& u, const Node& v) {
+      int n = arcs.size();
+      arcs.push_back(ArcT());
+      arcs[n].next_in = (*nodes)[v].first_in;
+      (*nodes)[v].first_in = n;
+      arcs[n].next_out = (*nodes)[u].first_out;
+      (*nodes)[u].first_out = n;
+      arcs[n].source = u;
+      arcs[n].target = v;
+      return Arc(n);
+    }
+
+    void clear() {
+      Node node;
+      for (first(node); node != INVALID; next(node)) {
+        (*nodes)[node].first_in = -1;
+        (*nodes)[node].first_out = -1;
+      }
+      arcs.clear();
+    }
+
+    void first(Node& node) const {
+      graph->first(node);
+    }
+
+    void next(Node& node) const {
+      graph->next(node);
+    }
+
+    void first(Arc& arc) const {
+      arc.id = arcs.size() - 1;
+    }
+
+    void next(Arc& arc) const {
+      --arc.id;
+    }
+
+    void firstOut(Arc& arc, const Node& node) const {
+      arc.id = (*nodes)[node].first_out;
+    }
+
+    void nextOut(Arc& arc) const {
+      arc.id = arcs[arc.id].next_out;
+    }
+
+    void firstIn(Arc& arc, const Node& node) const {
+      arc.id = (*nodes)[node].first_in;
+    }
+
+    void nextIn(Arc& arc) const {
+      arc.id = arcs[arc.id].next_in;
+    }
+
+    int id(const Node& node) const { return graph->id(node); }
+    int id(const Arc& arc) const { return arc.id; }
+
+    Node nodeFromId(int ix) const { return graph->nodeFromId(ix); }
+    Arc arcFromId(int ix) const { return Arc(ix); }
+
+    int maxNodeId() const { return graph->maxNodeId(); };
+    int maxArcId() const { return arcs.size() - 1; }
+
+    Node source(const Arc& arc) const { return arcs[arc.id].source;}
+    Node target(const Arc& arc) const { return arcs[arc.id].target;}
+
+    typedef typename ItemSetTraits<Graph, Node>::ItemNotifier NodeNotifier;
+
+    NodeNotifier& notifier(Node) const {
+      return graph->notifier(Node());
+    }
+
+    template <typename _Value>
+    class NodeMap : public Graph::template NodeMap<_Value> {
+    public:
+
+      typedef typename _Graph::template NodeMap<_Value> Parent;
+
+      explicit NodeMap(const SmartArcSetBase<Graph>& arcset)
+        : Parent(*arcset.graph) { }
+
+      NodeMap(const SmartArcSetBase<Graph>& arcset, const _Value& value)
+        : Parent(*arcset.graph, value) { }
+
+      NodeMap& operator=(const NodeMap& cmap) {
+        return operator=<NodeMap>(cmap);
+      }
+
+      template <typename CMap>
+      NodeMap& operator=(const CMap& cmap) {
+        Parent::operator=(cmap);
+        return *this;
+      }
+    };
+
+  };
+
+
+  /// \ingroup semi_adaptors
+  ///
+  /// \brief Digraph using a node set of another digraph or graph and
+  /// an own arc set.
+  ///
+  /// This structure can be used to establish another directed graph
+  /// over a node set of an existing one. This class uses the same
+  /// Node type as the underlying graph, and each valid node of the
+  /// original graph is valid in this arc set, therefore the node
+  /// objects of the original graph can be used directly with this
+  /// class. The node handling functions (id handling, observing, and
+  /// iterators) works equivalently as in the original graph.
+  ///
+  /// \param _Graph 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 implementation is slightly faster than the \c ListArcSet,
+  /// because it uses continuous storage for arcs and it uses just
+  /// single-linked lists for enumerate outgoing and incoming
+  /// arcs. Therefore the arcs cannot be erased from the arc sets.
+  ///
+  /// \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 is fully conform to the \ref concepts::Digraph
+  /// "Digraph" concept.
+  template <typename _Graph>
+  class SmartArcSet : public ArcSetExtender<SmartArcSetBase<_Graph> > {
+
+  public:
+
+    typedef ArcSetExtender<SmartArcSetBase<_Graph> > Parent;
+
+    typedef typename Parent::Node Node;
+    typedef typename Parent::Arc Arc;
+
+    typedef _Graph Graph;
+
+  protected:
+
+    typedef typename Parent::NodesImplBase NodesImplBase;
+
+    void eraseNode(const Node& node) {
+      if (typename Parent::InArcIt(*this, node) == INVALID &&
+          typename Parent::OutArcIt(*this, node) == INVALID) {
+        return;
+      }
+      throw typename NodesImplBase::Notifier::ImmediateDetach();
+    }
+
+    void clearNodes() {
+      Parent::clear();
+    }
+
+    class NodesImpl : public NodesImplBase {
+    public:
+      typedef NodesImplBase Parent;
+
+      NodesImpl(const Graph& graph, SmartArcSet& arcset)
+        : Parent(graph), _arcset(arcset) {}
+
+      virtual ~NodesImpl() {}
+
+      bool attached() const {
+        return Parent::attached();
+      }
+
+    protected:
+
+      virtual void erase(const Node& node) {
+        try {
+          _arcset.eraseNode(node);
+          Parent::erase(node);
+        } catch (const typename NodesImplBase::Notifier::ImmediateDetach&) {
+          Parent::clear();
+          throw;
+        }
+      }
+      virtual void erase(const std::vector<Node>& nodes) {
+        try {
+          for (int i = 0; i < int(nodes.size()); ++i) {
+            _arcset.eraseNode(nodes[i]);
+          }
+          Parent::erase(nodes);
+        } catch (const typename NodesImplBase::Notifier::ImmediateDetach&) {
+          Parent::clear();
+          throw;
+        }
+      }
+      virtual void clear() {
+        _arcset.clearNodes();
+        Parent::clear();
+      }
+
+    private:
+      SmartArcSet& _arcset;
+    };
+
+    NodesImpl nodes;
+
+  public:
+
+    /// \brief Constructor of the ArcSet.
+    ///
+    /// Constructor of the ArcSet.
+    SmartArcSet(const Graph& graph) : nodes(graph, *this) {
+      Parent::initalize(graph, nodes);
+    }
+
+    /// \brief Add a new arc to the digraph.
+    ///
+    /// Add a new arc to the digraph with source node \c s
+    /// and target node \c t.
+    /// \return the new arc.
+    Arc addArc(const Node& s, const Node& t) {
+      return Parent::addArc(s, t);
+    }
+
+    /// \brief Validity check
+    ///
+    /// This functions gives back false if the ArcSet is
+    /// invalidated. It occurs when a node in the underlying graph is
+    /// erased and it is not isolated in the ArcSet.
+    bool valid() const {
+      return nodes.attached();
+    }
+
+  };
+
+
+  template <typename _Graph>
+  class SmartEdgeSetBase {
+  public:
+
+    typedef _Graph Graph;
+    typedef typename Graph::Node Node;
+    typedef typename Graph::NodeIt NodeIt;
+
+  protected:
+
+    struct NodeT {
+      int first_out;
+      NodeT() : first_out(-1) {}
+    };
+
+    typedef typename ItemSetTraits<Graph, Node>::
+    template Map<NodeT>::Type NodesImplBase;
+
+    NodesImplBase* nodes;
+
+    struct ArcT {
+      Node target;
+      int next_out;
+      ArcT() {}
+    };
+
+    std::vector<ArcT> arcs;
+
+    const Graph* graph;
+
+    void initalize(const Graph& _graph, NodesImplBase& _nodes) {
+      graph = &_graph;
+      nodes = &_nodes;
+    }
+
+  public:
+
+    class Edge {
+      friend class SmartEdgeSetBase;
+    protected:
+
+      int id;
+      explicit Edge(int _id) { id = _id;}
+
+    public:
+      Edge() {}
+      Edge (Invalid) { id = -1; }
+      bool operator==(const Edge& arc) const {return id == arc.id;}
+      bool operator!=(const Edge& arc) const {return id != arc.id;}
+      bool operator<(const Edge& arc) const {return id < arc.id;}
+    };
+
+    class Arc {
+      friend class SmartEdgeSetBase;
+    protected:
+      Arc(int _id) : id(_id) {}
+      int id;
+    public:
+      operator Edge() const { return edgeFromId(id / 2); }
+
+      Arc() {}
+      Arc(Invalid) : id(-1) {}
+      bool operator==(const Arc& arc) const { return id == arc.id; }
+      bool operator!=(const Arc& arc) const { return id != arc.id; }
+      bool operator<(const Arc& arc) const { return id < arc.id; }
+    };
+
+    SmartEdgeSetBase() {}
+
+    Edge addEdge(const Node& u, const Node& v) {
+      int n = arcs.size();
+      arcs.push_back(ArcT());
+      arcs.push_back(ArcT());
+
+      arcs[n].target = u;
+      arcs[n | 1].target = v;
+
+      arcs[n].next_out = (*nodes)[v].first_out;
+      (*nodes)[v].first_out = n;
+
+      arcs[n | 1].next_out = (*nodes)[u].first_out;
+      (*nodes)[u].first_out = (n | 1);
+
+      return Edge(n / 2);
+    }
+
+    void clear() {
+      Node node;
+      for (first(node); node != INVALID; next(node)) {
+        (*nodes)[node].first_out = -1;
+      }
+      arcs.clear();
+    }
+
+    void first(Node& node) const {
+      graph->first(node);
+    }
+
+    void next(Node& node) const {
+      graph->next(node);
+    }
+
+    void first(Arc& arc) const {
+      arc.id = arcs.size() - 1;
+    }
+
+    void next(Arc& arc) const {
+      --arc.id;
+    }
+
+    void first(Edge& arc) const {
+      arc.id = arcs.size() / 2 - 1;
+    }
+
+    void next(Edge& arc) const {
+      --arc.id;
+    }
+
+    void firstOut(Arc& arc, const Node& node) const {
+      arc.id = (*nodes)[node].first_out;
+    }
+
+    void nextOut(Arc& arc) const {
+      arc.id = arcs[arc.id].next_out;
+    }
+
+    void firstIn(Arc& arc, const Node& node) const {
+      arc.id = (((*nodes)[node].first_out) ^ 1);
+      if (arc.id == -2) arc.id = -1;
+    }
+
+    void nextIn(Arc& arc) const {
+      arc.id = ((arcs[arc.id ^ 1].next_out) ^ 1);
+      if (arc.id == -2) arc.id = -1;
+    }
+
+    void firstInc(Edge &arc, bool& dir, const Node& node) const {
+      int de = (*nodes)[node].first_out;
+      if (de != -1 ) {
+        arc.id = de / 2;
+        dir = ((de & 1) == 1);
+      } else {
+        arc.id = -1;
+        dir = true;
+      }
+    }
+    void nextInc(Edge &arc, bool& dir) const {
+      int de = (arcs[(arc.id * 2) | (dir ? 1 : 0)].next_out);
+      if (de != -1 ) {
+        arc.id = de / 2;
+        dir = ((de & 1) == 1);
+      } else {
+        arc.id = -1;
+        dir = true;
+      }
+    }
+
+    static bool direction(Arc arc) {
+      return (arc.id & 1) == 1;
+    }
+
+    static Arc direct(Edge edge, bool dir) {
+      return Arc(edge.id * 2 + (dir ? 1 : 0));
+    }
+
+    int id(Node node) const { return graph->id(node); }
+    static int id(Arc arc) { return arc.id; }
+    static int id(Edge arc) { return arc.id; }
+
+    Node nodeFromId(int id) const { return graph->nodeFromId(id); }
+    static Arc arcFromId(int id) { return Arc(id); }
+    static Edge edgeFromId(int id) { return Edge(id);}
+
+    int maxNodeId() const { return graph->maxNodeId(); };
+    int maxArcId() const { return arcs.size() - 1; }
+    int maxEdgeId() const { return arcs.size() / 2 - 1; }
+
+    Node source(Arc e) const { return arcs[e.id ^ 1].target; }
+    Node target(Arc e) const { return arcs[e.id].target; }
+
+    Node u(Edge e) const { return arcs[2 * e.id].target; }
+    Node v(Edge e) const { return arcs[2 * e.id + 1].target; }
+
+    typedef typename ItemSetTraits<Graph, Node>::ItemNotifier NodeNotifier;
+
+    NodeNotifier& notifier(Node) const {
+      return graph->notifier(Node());
+    }
+
+    template <typename _Value>
+    class NodeMap : public Graph::template NodeMap<_Value> {
+    public:
+
+      typedef typename _Graph::template NodeMap<_Value> Parent;
+
+      explicit NodeMap(const SmartEdgeSetBase<Graph>& arcset)
+        : Parent(*arcset.graph) { }
+
+      NodeMap(const SmartEdgeSetBase<Graph>& arcset, const _Value& value)
+        : Parent(*arcset.graph, value) { }
+
+      NodeMap& operator=(const NodeMap& cmap) {
+        return operator=<NodeMap>(cmap);
+      }
+
+      template <typename CMap>
+      NodeMap& operator=(const CMap& cmap) {
+        Parent::operator=(cmap);
+        return *this;
+      }
+    };
+
+  };
+
+  /// \ingroup semi_adaptors
+  ///
+  /// \brief Graph using a node set of another digraph or graph and an
+  /// own edge set.
+  ///
+  /// This structure can be used to establish another graph over a
+  /// node set of an existing one. This class uses the same Node type
+  /// as the underlying graph, and each valid node of the original
+  /// graph is valid in this arc set, therefore the node objects of
+  /// the original graph can be used directly with this class. The
+  /// node handling functions (id handling, observing, and iterators)
+  /// works equivalently as in the original graph.
+  ///
+  /// \param _Graph 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 implementation is slightly faster than the \c ListEdgeSet,
+  /// because it uses continuous storage for edges and it uses just
+  /// single-linked lists for enumerate incident edges. Therefore the
+  /// edges cannot be erased from the edge sets.
+  ///
+  /// \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 is fully conform to the \ref concepts::Graph
+  /// "Graph" concept.
+  template <typename _Graph>
+  class SmartEdgeSet : public EdgeSetExtender<SmartEdgeSetBase<_Graph> > {
+
+  public:
+
+    typedef EdgeSetExtender<SmartEdgeSetBase<_Graph> > Parent;
+
+    typedef typename Parent::Node Node;
+    typedef typename Parent::Arc Arc;
+    typedef typename Parent::Edge Edge;
+
+    typedef _Graph Graph;
+
+  protected:
+
+    typedef typename Parent::NodesImplBase NodesImplBase;
+
+    void eraseNode(const Node& node) {
+      if (typename Parent::IncEdgeIt(*this, node) == INVALID) {
+        return;
+      }
+      throw typename NodesImplBase::Notifier::ImmediateDetach();
+    }
+
+    void clearNodes() {
+      Parent::clear();
+    }
+
+    class NodesImpl : public NodesImplBase {
+    public:
+      typedef NodesImplBase Parent;
+
+      NodesImpl(const Graph& graph, SmartEdgeSet& arcset)
+        : Parent(graph), _arcset(arcset) {}
+
+      virtual ~NodesImpl() {}
+
+      bool attached() const {
+        return Parent::attached();
+      }
+
+    protected:
+
+      virtual void erase(const Node& node) {
+        try {
+          _arcset.eraseNode(node);
+          Parent::erase(node);
+        } catch (const typename NodesImplBase::Notifier::ImmediateDetach&) {
+          Parent::clear();
+          throw;
+        }
+      }
+      virtual void erase(const std::vector<Node>& nodes) {
+        try {
+          for (int i = 0; i < int(nodes.size()); ++i) {
+            _arcset.eraseNode(nodes[i]);
+          }
+          Parent::erase(nodes);
+        } catch (const typename NodesImplBase::Notifier::ImmediateDetach&) {
+          Parent::clear();
+          throw;
+        }
+      }
+      virtual void clear() {
+        _arcset.clearNodes();
+        Parent::clear();
+      }
+
+    private:
+      SmartEdgeSet& _arcset;
+    };
+
+    NodesImpl nodes;
+
+  public:
+
+    /// \brief Constructor of the EdgeSet.
+    ///
+    /// Constructor of the EdgeSet.
+    SmartEdgeSet(const Graph& graph) : nodes(graph, *this) {
+      Parent::initalize(graph, nodes);
+    }
+
+    /// \brief Add a new edge to the graph.
+    ///
+    /// Add a new edge to the graph with node \c u
+    /// and node \c v endpoints.
+    /// \return the new edge.
+    Edge addEdge(const Node& u, const Node& v) {
+      return Parent::addEdge(u, v);
+    }
+
+    /// \brief Validity check
+    ///
+    /// This functions gives back false if the EdgeSet is
+    /// invalidated. It occurs when a node in the underlying graph is
+    /// erased and it is not isolated in the EdgeSet.
+    bool valid() const {
+      return nodes.attached();
+    }
+
+  };
+
+}
+
+#endif
Index: lemon/elevator.h
===================================================================
--- lemon/elevator.h	(revision 440)
+++ lemon/elevator.h	(revision 383)
@@ -3,5 +3,5 @@
  * This file is a part of LEMON, a generic C++ optimization library.
  *
- * Copyright (C) 2003-2009
+ * Copyright (C) 2003-2008
  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
  * (Egervary Research Group on Combinatorial Optimization, EGRES).
Index: lemon/error.h
===================================================================
--- lemon/error.h	(revision 440)
+++ lemon/error.h	(revision 291)
@@ -3,5 +3,5 @@
  * This file is a part of LEMON, a generic C++ optimization library.
  *
- * Copyright (C) 2003-2009
+ * Copyright (C) 2003-2008
  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
  * (Egervary Research Group on Combinatorial Optimization, EGRES).
Index: lemon/full_graph.h
===================================================================
--- lemon/full_graph.h	(revision 440)
+++ lemon/full_graph.h	(revision 360)
@@ -3,5 +3,5 @@
  * This file is a part of LEMON, a generic C++ optimization library.
  *
- * Copyright (C) 2003-2009
+ * Copyright (C) 2003-2008
  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
  * (Egervary Research Group on Combinatorial Optimization, EGRES).
Index: lemon/graph_to_eps.h
===================================================================
--- lemon/graph_to_eps.h	(revision 440)
+++ lemon/graph_to_eps.h	(revision 313)
@@ -3,5 +3,5 @@
  * This file is a part of LEMON, a generic C++ optimization library.
  *
- * Copyright (C) 2003-2009
+ * Copyright (C) 2003-2008
  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
  * (Egervary Research Group on Combinatorial Optimization, EGRES).
Index: lemon/grid_graph.h
===================================================================
--- lemon/grid_graph.h	(revision 440)
+++ lemon/grid_graph.h	(revision 360)
@@ -3,5 +3,5 @@
  * This file is a part of LEMON, a generic C++ optimization library.
  *
- * Copyright (C) 2003-2009
+ * Copyright (C) 2003-2008
  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
  * (Egervary Research Group on Combinatorial Optimization, EGRES).
Index: lemon/hao_orlin.h
===================================================================
--- lemon/hao_orlin.h	(revision 440)
+++ lemon/hao_orlin.h	(revision 412)
@@ -3,5 +3,5 @@
  * This file is a part of LEMON, a generic C++ optimization library.
  *
- * Copyright (C) 2003-2009
+ * Copyright (C) 2003-2008
  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
  * (Egervary Research Group on Combinatorial Optimization, EGRES).
@@ -239,5 +239,5 @@
           if (reached[t]) continue;
           _sets.push_front(std::list<int>());
-
+          
           queue[qlast++] = t;
           reached.set(t, true);
@@ -539,5 +539,5 @@
           if (reached[t]) continue;
           _sets.push_front(std::list<int>());
-
+          
           queue[qlast++] = t;
           reached.set(t, true);
Index: lemon/hypercube_graph.h
===================================================================
--- lemon/hypercube_graph.h	(revision 440)
+++ lemon/hypercube_graph.h	(revision 372)
@@ -3,5 +3,5 @@
  * This file is a part of LEMON, a generic C++ optimization library.
  *
- * Copyright (C) 2003-2009
+ * Copyright (C) 2003-2008
  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
  * (Egervary Research Group on Combinatorial Optimization, EGRES).
Index: lemon/kruskal.h
===================================================================
--- lemon/kruskal.h	(revision 440)
+++ lemon/kruskal.h	(revision 220)
@@ -3,5 +3,5 @@
  * This file is a part of LEMON, a generic C++ optimization library.
  *
- * Copyright (C) 2003-2009
+ * Copyright (C) 2003-2008
  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
  * (Egervary Research Group on Combinatorial Optimization, EGRES).
Index: lemon/lgf_reader.h
===================================================================
--- lemon/lgf_reader.h	(revision 440)
+++ lemon/lgf_reader.h	(revision 319)
@@ -3,5 +3,5 @@
  * This file is a part of LEMON, a generic C++ optimization library.
  *
- * Copyright (C) 2003-2009
+ * Copyright (C) 2003-2008
  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
  * (Egervary Research Group on Combinatorial Optimization, EGRES).
@@ -871,7 +871,5 @@
         readLine();
       }
-      if (readSuccess()) {
-        line.putback(c);
-      }
+      line.putback(c);
     }
 
@@ -1702,7 +1700,5 @@
         readLine();
       }
-      if (readSuccess()) {
-        line.putback(c);
-      }
+      line.putback(c);
     }
 
@@ -2231,7 +2227,5 @@
         readLine();
       }
-      if (readSuccess()) {
-        line.putback(c);
-      }
+      line.putback(c);
     }
 
@@ -2574,7 +2568,5 @@
         readLine();
       }
-      if (readSuccess()) {
-        line.putback(c);
-      }
+      line.putback(c);
     }
 
Index: lemon/lgf_writer.h
===================================================================
--- lemon/lgf_writer.h	(revision 440)
+++ lemon/lgf_writer.h	(revision 319)
@@ -3,5 +3,5 @@
  * This file is a part of LEMON, a generic C++ optimization library.
  *
- * Copyright (C) 2003-2009
+ * Copyright (C) 2003-2008
  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
  * (Egervary Research Group on Combinatorial Optimization, EGRES).
Index: lemon/list_graph.h
===================================================================
--- lemon/list_graph.h	(revision 440)
+++ lemon/list_graph.h	(revision 329)
@@ -3,5 +3,5 @@
  * This file is a part of LEMON, a generic C++ optimization library.
  *
- * Copyright (C) 2003-2009
+ * Copyright (C) 2003-2008
  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
  * (Egervary Research Group on Combinatorial Optimization, EGRES).
Index: lemon/maps.h
===================================================================
--- lemon/maps.h	(revision 440)
+++ lemon/maps.h	(revision 314)
@@ -3,5 +3,5 @@
  * This file is a part of LEMON, a generic C++ optimization library.
  *
- * Copyright (C) 2003-2009
+ * Copyright (C) 2003-2008
  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
  * (Egervary Research Group on Combinatorial Optimization, EGRES).
Index: lemon/math.h
===================================================================
--- lemon/math.h	(revision 440)
+++ lemon/math.h	(revision 209)
@@ -3,5 +3,5 @@
  * This file is a part of LEMON, a generic C++ optimization library.
  *
- * Copyright (C) 2003-2009
+ * Copyright (C) 2003-2008
  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
  * (Egervary Research Group on Combinatorial Optimization, EGRES).
Index: lemon/max_matching.h
===================================================================
--- lemon/max_matching.h	(revision 440)
+++ lemon/max_matching.h	(revision 330)
@@ -3,5 +3,5 @@
  * This file is a part of LEMON, a generic C++ optimization library.
  *
- * Copyright (C) 2003-2009
+ * Copyright (C) 2003-2008
  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
  * (Egervary Research Group on Combinatorial Optimization, EGRES).
@@ -417,5 +417,5 @@
     /// \ref init(), \ref greedyInit() or \ref matchingInit()
     /// functions first, then you can start the algorithm with the \ref
-    /// startSparse() or startDense() functions.
+    /// startParse() or startDense() functions.
 
     ///@{
Index: lemon/nauty_reader.h
===================================================================
--- lemon/nauty_reader.h	(revision 440)
+++ lemon/nauty_reader.h	(revision 359)
@@ -3,5 +3,5 @@
  * This file is a part of LEMON, a generic C++ optimization library.
  *
- * Copyright (C) 2003-2009
+ * Copyright (C) 2003-2008
  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
  * (Egervary Research Group on Combinatorial Optimization, EGRES).
Index: lemon/path.h
===================================================================
--- lemon/path.h	(revision 440)
+++ lemon/path.h	(revision 313)
@@ -3,5 +3,5 @@
  * This file is a part of LEMON, a generic C++ optimization library.
  *
- * Copyright (C) 2003-2009
+ * Copyright (C) 2003-2008
  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
  * (Egervary Research Group on Combinatorial Optimization, EGRES).
Index: lemon/preflow.h
===================================================================
--- lemon/preflow.h	(revision 440)
+++ lemon/preflow.h	(revision 420)
@@ -3,5 +3,5 @@
  * This file is a part of LEMON, a generic C++ optimization library.
  *
- * Copyright (C) 2003-2009
+ * Copyright (C) 2003-2008
  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
  * (Egervary Research Group on Combinatorial Optimization, EGRES).
Index: lemon/radix_sort.h
===================================================================
--- lemon/radix_sort.h	(revision 444)
+++ 	(revision )
@@ -1,487 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library.
- *
- * Copyright (C) 2003-2009
- * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
- * (Egervary Research Group on Combinatorial Optimization, EGRES).
- *
- * Permission to use, modify and distribute this software is granted
- * provided that this copyright notice appears in all copies. For
- * precise terms see the accompanying LICENSE file.
- *
- * This software is provided "AS IS" with no warranty of any kind,
- * express or implied, and with no claim as to its suitability for any
- * purpose.
- *
- */
-
-#ifndef RADIX_SORT_H
-#define RADIX_SORT_H
-
-/// \ingroup auxalg
-/// \file
-/// \brief Radix sort
-///
-/// Linear time sorting algorithms
-
-#include <vector>
-#include <limits>
-#include <iterator>
-#include <algorithm>
-
-namespace lemon {
-
-  namespace _radix_sort_bits {
-
-    template <typename Value>
-    struct Identity {
-      const Value& operator()(const Value& val) {
-        return val;
-      }
-    };
-
-
-    template <typename Value, typename Iterator, typename Functor>
-    Iterator radixSortPartition(Iterator first, Iterator last,
-                                Functor functor, Value mask) {
-      while (first != last && !(functor(*first) & mask)) {
-        ++first;
-      }
-      if (first == last) {
-        return first;
-      }
-      --last;
-      while (first != last && (functor(*last) & mask)) {
-        --last;
-      }
-      if (first == last) {
-        return first;
-      }
-      std::iter_swap(first, last);
-      ++first;
-      if (!(first < last)) {
-        return first;
-      }
-      while (true) {
-        while (!(functor(*first) & mask)) {
-          ++first;
-        }
-        --last;
-        while (functor(*last) & mask) {
-          --last;
-        }
-        if (!(first < last)) {
-          return first;
-        }
-        std::iter_swap(first, last);
-        ++first;
-      }
-    }
-
-    template <typename Iterator, typename Functor>
-    Iterator radixSortSignPartition(Iterator first, Iterator last,
-                                    Functor functor) {
-      while (first != last && functor(*first) < 0) {
-        ++first;
-      }
-      if (first == last) {
-        return first;
-      }
-      --last;
-      while (first != last && functor(*last) >= 0) {
-        --last;
-      }
-      if (first == last) {
-        return first;
-      }
-      std::iter_swap(first, last);
-      ++first;
-      if (!(first < last)) {
-        return first;
-      }
-      while (true) {
-        while (functor(*first) < 0) {
-          ++first;
-        }
-        --last;
-        while (functor(*last) >= 0) {
-          --last;
-        }
-        if (!(first < last)) {
-          return first;
-        }
-        std::iter_swap(first, last);
-        ++first;
-      }
-    }
-
-    template <typename Value, typename Iterator, typename Functor>
-    void radixIntroSort(Iterator first, Iterator last,
-                        Functor functor, Value mask) {
-      while (mask != 0 && last - first > 1) {
-        Iterator cut = radixSortPartition(first, last, functor, mask);
-        mask >>= 1;
-        radixIntroSort(first, cut, functor, mask);
-        first = cut;
-      }
-    }
-
-    template <typename Value, typename Iterator, typename Functor>
-    void radixSignedSort(Iterator first, Iterator last, Functor functor) {
-
-      Iterator cut = radixSortSignPartition(first, last, functor);
-
-      Value mask;
-      int max_digit;
-      Iterator it;
-
-      mask = ~0; max_digit = 0;
-      for (it = first; it != cut; ++it) {
-        while ((mask & functor(*it)) != mask) {
-          ++max_digit;
-          mask <<= 1;
-        }
-      }
-      radixIntroSort(first, cut, functor, 1 << max_digit);
-
-      mask = 0; max_digit = 0;
-      for (it = cut; it != last; ++it) {
-        while ((mask | functor(*it)) != mask) {
-          ++max_digit;
-          mask <<= 1; mask |= 1;
-        }
-      }
-      radixIntroSort(cut, last, functor, 1 << max_digit);
-    }
-
-    template <typename Value, typename Iterator, typename Functor>
-    void radixUnsignedSort(Iterator first, Iterator last, Functor functor) {
-
-      Value mask = 0;
-      int max_digit = 0;
-
-      Iterator it;
-      for (it = first; it != last; ++it) {
-        while ((mask | functor(*it)) != mask) {
-          ++max_digit;
-          mask <<= 1; mask |= 1;
-        }
-      }
-      radixIntroSort(first, last, functor, 1 << max_digit);
-    }
-
-
-    template <typename Value,
-              bool sign = std::numeric_limits<Value>::is_signed >
-    struct RadixSortSelector {
-      template <typename Iterator, typename Functor>
-      static void sort(Iterator first, Iterator last, Functor functor) {
-        radixSignedSort<Value>(first, last, functor);
-      }
-    };
-
-    template <typename Value>
-    struct RadixSortSelector<Value, false> {
-      template <typename Iterator, typename Functor>
-      static void sort(Iterator first, Iterator last, Functor functor) {
-        radixUnsignedSort<Value>(first, last, functor);
-      }
-    };
-
-  }
-
-  /// \ingroup auxalg
-  ///
-  /// \brief Sorts the STL compatible range into ascending order.
-  ///
-  /// The \c radixSort sorts an STL compatible range into ascending
-  /// order.  The radix sort algorithm can sort items which are mapped
-  /// to integers with an adaptable unary function \c functor and the
-  /// order will be ascending according to these mapped values.
-  ///
-  /// It is also possible to use a normal function instead
-  /// of the functor object. If the functor is not given it will use
-  /// the identity function instead.
-  ///
-  /// This is a special quick sort algorithm where the pivot
-  /// values to split the items are choosen to be \f$ 2^k \f$ for each \c k.
-  /// Therefore, the time complexity of the
-  /// algorithm is \f$ O(\log(c)n) \f$ and it uses \f$ O(\log(c)) \f$,
-  /// additional space, where \c c is the maximal value and \c n is the
-  /// number of the items in the container.
-  ///
-  /// \param first The begin of the given range.
-  /// \param last The end of the given range.
-  /// \param functor An adaptible unary function or a normal function
-  /// which maps the items to any integer type which can be either
-  /// signed or unsigned.
-  ///
-  /// \sa stableRadixSort()
-  template <typename Iterator, typename Functor>
-  void radixSort(Iterator first, Iterator last, Functor functor) {
-    using namespace _radix_sort_bits;
-    typedef typename Functor::result_type Value;
-    RadixSortSelector<Value>::sort(first, last, functor);
-  }
-
-  template <typename Iterator, typename Value, typename Key>
-  void radixSort(Iterator first, Iterator last, Value (*functor)(Key)) {
-    using namespace _radix_sort_bits;
-    RadixSortSelector<Value>::sort(first, last, functor);
-  }
-
-  template <typename Iterator, typename Value, typename Key>
-  void radixSort(Iterator first, Iterator last, Value& (*functor)(Key)) {
-    using namespace _radix_sort_bits;
-    RadixSortSelector<Value>::sort(first, last, functor);
-  }
-
-  template <typename Iterator, typename Value, typename Key>
-  void radixSort(Iterator first, Iterator last, Value (*functor)(Key&)) {
-    using namespace _radix_sort_bits;
-    RadixSortSelector<Value>::sort(first, last, functor);
-  }
-
-  template <typename Iterator, typename Value, typename Key>
-  void radixSort(Iterator first, Iterator last, Value& (*functor)(Key&)) {
-    using namespace _radix_sort_bits;
-    RadixSortSelector<Value>::sort(first, last, functor);
-  }
-
-  template <typename Iterator>
-  void radixSort(Iterator first, Iterator last) {
-    using namespace _radix_sort_bits;
-    typedef typename std::iterator_traits<Iterator>::value_type Value;
-    RadixSortSelector<Value>::sort(first, last, Identity<Value>());
-  }
-
-  namespace _radix_sort_bits {
-
-    template <typename Value>
-    unsigned char valueByte(Value value, int byte) {
-      return value >> (std::numeric_limits<unsigned char>::digits * byte);
-    }
-
-    template <typename Functor, typename Key>
-    void stableRadixIntroSort(Key *first, Key *last, Key *target,
-                              int byte, Functor functor) {
-      const int size =
-        unsigned(std::numeric_limits<unsigned char>::max()) + 1;
-      std::vector<int> counter(size);
-      for (int i = 0; i < size; ++i) {
-        counter[i] = 0;
-      }
-      Key *it = first;
-      while (first != last) {
-        ++counter[valueByte(functor(*first), byte)];
-        ++first;
-      }
-      int prev, num = 0;
-      for (int i = 0; i < size; ++i) {
-        prev = num;
-        num += counter[i];
-        counter[i] = prev;
-      }
-      while (it != last) {
-        target[counter[valueByte(functor(*it), byte)]++] = *it;
-        ++it;
-      }
-    }
-
-    template <typename Functor, typename Key>
-    void signedStableRadixIntroSort(Key *first, Key *last, Key *target,
-                                    int byte, Functor functor) {
-      const int size =
-        unsigned(std::numeric_limits<unsigned char>::max()) + 1;
-      std::vector<int> counter(size);
-      for (int i = 0; i < size; ++i) {
-        counter[i] = 0;
-      }
-      Key *it = first;
-      while (first != last) {
-        counter[valueByte(functor(*first), byte)]++;
-        ++first;
-      }
-      int prev, num = 0;
-      for (int i = size / 2; i < size; ++i) {
-        prev = num;
-        num += counter[i];
-        counter[i] = prev;
-      }
-      for (int i = 0; i < size / 2; ++i) {
-        prev = num;
-        num += counter[i];
-        counter[i] = prev;
-      }
-      while (it != last) {
-        target[counter[valueByte(functor(*it), byte)]++] = *it;
-        ++it;
-      }
-    }
-
-
-    template <typename Value, typename Iterator, typename Functor>
-    void stableRadixSignedSort(Iterator first, Iterator last, Functor functor) {
-      if (first == last) return;
-      typedef typename std::iterator_traits<Iterator>::value_type Key;
-      typedef std::allocator<Key> Allocator;
-      Allocator allocator;
-
-      int length = std::distance(first, last);
-      Key* buffer = allocator.allocate(2 * length);
-      try {
-        bool dir = true;
-        std::copy(first, last, buffer);
-        for (int i = 0; i < int(sizeof(Value)) - 1; ++i) {
-          if (dir) {
-            stableRadixIntroSort(buffer, buffer + length, buffer + length,
-                                 i, functor);
-          } else {
-            stableRadixIntroSort(buffer + length, buffer + 2 * length, buffer,
-                                 i, functor);
-          }
-          dir = !dir;
-        }
-        if (dir) {
-          signedStableRadixIntroSort(buffer, buffer + length, buffer + length,
-                                     sizeof(Value) - 1, functor);
-          std::copy(buffer + length, buffer + 2 * length, first);
-        }        else {
-          signedStableRadixIntroSort(buffer + length, buffer + 2 * length,
-                                     buffer, sizeof(Value) - 1, functor);
-          std::copy(buffer, buffer + length, first);
-        }
-      } catch (...) {
-        allocator.deallocate(buffer, 2 * length);
-        throw;
-      }
-      allocator.deallocate(buffer, 2 * length);
-    }
-
-    template <typename Value, typename Iterator, typename Functor>
-    void stableRadixUnsignedSort(Iterator first, Iterator last,
-                                 Functor functor) {
-      if (first == last) return;
-      typedef typename std::iterator_traits<Iterator>::value_type Key;
-      typedef std::allocator<Key> Allocator;
-      Allocator allocator;
-
-      int length = std::distance(first, last);
-      Key *buffer = allocator.allocate(2 * length);
-      try {
-        bool dir = true;
-        std::copy(first, last, buffer);
-        for (int i = 0; i < int(sizeof(Value)); ++i) {
-          if (dir) {
-            stableRadixIntroSort(buffer, buffer + length,
-                                 buffer + length, i, functor);
-          } else {
-            stableRadixIntroSort(buffer + length, buffer + 2 * length,
-                                 buffer, i, functor);
-          }
-          dir = !dir;
-        }
-        if (dir) {
-          std::copy(buffer, buffer + length, first);
-        }        else {
-          std::copy(buffer + length, buffer + 2 * length, first);
-        }
-      } catch (...) {
-        allocator.deallocate(buffer, 2 * length);
-        throw;
-      }
-      allocator.deallocate(buffer, 2 * length);
-    }
-
-
-
-    template <typename Value,
-              bool sign = std::numeric_limits<Value>::is_signed >
-    struct StableRadixSortSelector {
-      template <typename Iterator, typename Functor>
-      static void sort(Iterator first, Iterator last, Functor functor) {
-        stableRadixSignedSort<Value>(first, last, functor);
-      }
-    };
-
-    template <typename Value>
-    struct StableRadixSortSelector<Value, false> {
-      template <typename Iterator, typename Functor>
-      static void sort(Iterator first, Iterator last, Functor functor) {
-        stableRadixUnsignedSort<Value>(first, last, functor);
-      }
-    };
-
-  }
-
-  /// \ingroup auxalg
-  ///
-  /// \brief Sorts the STL compatible range into ascending order in a stable
-  /// way.
-  ///
-  /// This function sorts an STL compatible range into ascending
-  /// order according to an integer mapping in the same as radixSort() does.
-  ///
-  /// This sorting algorithm is stable, i.e. the order of two equal
-  /// elements remains the same after the sorting.
-  ///
-  /// This sort algorithm  use a radix forward sort on the
-  /// bytes of the integer number. The algorithm sorts the items
-  /// byte-by-byte. First, it counts how many times a byte value occurs
-  /// in the container, then it copies the corresponding items to
-  /// another container in asceding order in \c O(n) time.
-  ///
-  /// The time complexity of the algorithm is \f$ O(\log(c)n) \f$ and
-  /// it uses \f$ O(n) \f$, additional space, where \c c is the
-  /// maximal value and \c n is the number of the items in the
-  /// container.
-  ///
-
-  /// \param first The begin of the given range.
-  /// \param last The end of the given range.
-  /// \param functor An adaptible unary function or a normal function
-  /// which maps the items to any integer type which can be either
-  /// signed or unsigned.
-  /// \sa radixSort()
-  template <typename Iterator, typename Functor>
-  void stableRadixSort(Iterator first, Iterator last, Functor functor) {
-    using namespace _radix_sort_bits;
-    typedef typename Functor::result_type Value;
-    StableRadixSortSelector<Value>::sort(first, last, functor);
-  }
-
-  template <typename Iterator, typename Value, typename Key>
-  void stableRadixSort(Iterator first, Iterator last, Value (*functor)(Key)) {
-    using namespace _radix_sort_bits;
-    StableRadixSortSelector<Value>::sort(first, last, functor);
-  }
-
-  template <typename Iterator, typename Value, typename Key>
-  void stableRadixSort(Iterator first, Iterator last, Value& (*functor)(Key)) {
-    using namespace _radix_sort_bits;
-    StableRadixSortSelector<Value>::sort(first, last, functor);
-  }
-
-  template <typename Iterator, typename Value, typename Key>
-  void stableRadixSort(Iterator first, Iterator last, Value (*functor)(Key&)) {
-    using namespace _radix_sort_bits;
-    StableRadixSortSelector<Value>::sort(first, last, functor);
-  }
-
-  template <typename Iterator, typename Value, typename Key>
-  void stableRadixSort(Iterator first, Iterator last, Value& (*functor)(Key&)) {
-    using namespace _radix_sort_bits;
-    StableRadixSortSelector<Value>::sort(first, last, functor);
-  }
-
-  template <typename Iterator>
-  void stableRadixSort(Iterator first, Iterator last) {
-    using namespace _radix_sort_bits;
-    typedef typename std::iterator_traits<Iterator>::value_type Value;
-    StableRadixSortSelector<Value>::sort(first, last, Identity<Value>());
-  }
-
-}
-
-#endif
Index: lemon/random.cc
===================================================================
--- lemon/random.cc	(revision 440)
+++ lemon/random.cc	(revision 209)
@@ -3,5 +3,5 @@
  * This file is a part of LEMON, a generic C++ optimization library.
  *
- * Copyright (C) 2003-2009
+ * Copyright (C) 2003-2008
  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
  * (Egervary Research Group on Combinatorial Optimization, EGRES).
Index: lemon/random.h
===================================================================
--- lemon/random.h	(revision 440)
+++ lemon/random.h	(revision 378)
@@ -3,5 +3,5 @@
  * This file is a part of LEMON, a generic C++ optimization library.
  *
- * Copyright (C) 2003-2009
+ * Copyright (C) 2003-2008
  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
  * (Egervary Research Group on Combinatorial Optimization, EGRES).
Index: lemon/smart_graph.h
===================================================================
--- lemon/smart_graph.h	(revision 440)
+++ lemon/smart_graph.h	(revision 375)
@@ -3,5 +3,5 @@
  * This file is a part of LEMON, a generic C++ optimization library.
  *
- * Copyright (C) 2003-2009
+ * Copyright (C) 2003-2008
  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
  * (Egervary Research Group on Combinatorial Optimization, EGRES).
Index: lemon/suurballe.h
===================================================================
--- lemon/suurballe.h	(revision 440)
+++ lemon/suurballe.h	(revision 346)
@@ -1,7 +1,7 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
+/* -*- C++ -*-
  *
- * This file is a part of LEMON, a generic C++ optimization library.
+ * This file is a part of LEMON, a generic C++ optimization library
  *
- * Copyright (C) 2003-2009
+ * Copyright (C) 2003-2008
  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
  * (Egervary Research Group on Combinatorial Optimization, EGRES).
@@ -52,5 +52,5 @@
   ///
   /// \note For finding node-disjoint paths this algorithm can be used
-  /// with \ref SplitNodes.
+  /// with \ref SplitDigraphAdaptor.
 #ifdef DOXYGEN
   template <typename Digraph, typename LengthMap>
@@ -77,5 +77,5 @@
 
   private:
-
+  
     /// \brief Special implementation of the Dijkstra algorithm
     /// for finding shortest paths in the residual network.
@@ -107,5 +107,5 @@
       // The processed (i.e. permanently labeled) nodes
       std::vector<Node> _proc_nodes;
-
+      
       Node _s;
       Node _t;
@@ -201,5 +201,5 @@
     // The length map
     const LengthMap &_length;
-
+    
     // Arc map of the current flow
     FlowMap *_flow;
@@ -269,5 +269,5 @@
     /// This function sets the potential map.
     ///
-    /// The potentials provide the dual solution of the underlying
+    /// The potentials provide the dual solution of the underlying 
     /// minimum cost flow problem.
     ///
@@ -331,5 +331,5 @@
       for (NodeIt n(_graph); n != INVALID; ++n) (*_potential)[n] = 0;
 
-      _dijkstra = new ResidualDijkstra( _graph, *_flow, _length,
+      _dijkstra = new ResidualDijkstra( _graph, *_flow, _length, 
                                         *_potential, _pred,
                                         _source, _target );
@@ -371,5 +371,5 @@
       return _path_num;
     }
-
+    
     /// \brief Compute the paths from the flow.
     ///
Index: lemon/time_measure.h
===================================================================
--- lemon/time_measure.h	(revision 440)
+++ lemon/time_measure.h	(revision 314)
@@ -3,5 +3,5 @@
  * This file is a part of LEMON, a generic C++ optimization library.
  *
- * Copyright (C) 2003-2009
+ * Copyright (C) 2003-2008
  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
  * (Egervary Research Group on Combinatorial Optimization, EGRES).
Index: lemon/tolerance.h
===================================================================
--- lemon/tolerance.h	(revision 440)
+++ lemon/tolerance.h	(revision 280)
@@ -3,5 +3,5 @@
  * This file is a part of LEMON, a generic C++ optimization library.
  *
- * Copyright (C) 2003-2009
+ * Copyright (C) 2003-2008
  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
  * (Egervary Research Group on Combinatorial Optimization, EGRES).
Index: lemon/unionfind.h
===================================================================
--- lemon/unionfind.h	(revision 440)
+++ lemon/unionfind.h	(revision 236)
@@ -3,5 +3,5 @@
  * This file is a part of LEMON, a generic C++ optimization library.
  *
- * Copyright (C) 2003-2009
+ * Copyright (C) 2003-2008
  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
  * (Egervary Research Group on Combinatorial Optimization, EGRES).
@@ -1178,8 +1178,7 @@
             if (nodes[nodes[jd].next].size < cmax) {
               pushLeft(nodes[jd].next, nodes[jd].left);
-              if (less(jd, nodes[jd].next) ||
-                  nodes[jd].item == nodes[pd].item) {
-                nodes[nodes[jd].next].prio = nodes[jd].prio;
-                nodes[nodes[jd].next].item = nodes[jd].item;
+              if (less(nodes[jd].left, nodes[jd].next)) {
+                nodes[nodes[jd].next].prio = nodes[nodes[jd].left].prio;
+                nodes[nodes[jd].next].item = nodes[nodes[jd].left].item;
               }
               popLeft(pd);
@@ -1190,8 +1189,7 @@
               popLeft(nodes[jd].next);
               pushRight(jd, ld);
-              if (less(ld, nodes[jd].left) ||
-                  nodes[ld].item == nodes[pd].item) {
+              if (less(ld, nodes[jd].left)) {
                 nodes[jd].item = nodes[ld].item;
-                nodes[jd].prio = nodes[ld].prio;
+                nodes[jd].prio = nodes[jd].prio;
               }
               if (nodes[nodes[jd].next].item == nodes[ld].item) {
@@ -1222,8 +1220,7 @@
             if (nodes[nodes[jd].prev].size < cmax) {
               pushRight(nodes[jd].prev, nodes[jd].right);
-              if (less(jd, nodes[jd].prev) ||
-                  nodes[jd].item == nodes[pd].item) {
-                nodes[nodes[jd].prev].prio = nodes[jd].prio;
-                nodes[nodes[jd].prev].item = nodes[jd].item;
+              if (less(nodes[jd].right, nodes[jd].prev)) {
+                nodes[nodes[jd].prev].prio = nodes[nodes[jd].right].prio;
+                nodes[nodes[jd].prev].item = nodes[nodes[jd].right].item;
               }
               popRight(pd);
@@ -1234,8 +1231,7 @@
               popRight(nodes[jd].prev);
               pushLeft(jd, ld);
-              if (less(ld, nodes[jd].right) ||
-                  nodes[ld].item == nodes[pd].item) {
+              if (less(ld, nodes[jd].right)) {
                 nodes[jd].item = nodes[ld].item;
-                nodes[jd].prio = nodes[ld].prio;
+                nodes[jd].prio = nodes[jd].prio;
               }
               if (nodes[nodes[jd].prev].item == nodes[ld].item) {
@@ -1255,4 +1251,9 @@
       return comp(nodes[id].prio, nodes[jd].prio);
     }
+
+    bool equal(int id, int jd) const {
+      return !less(id, jd) && !less(jd, id);
+    }
+
 
   public:
@@ -1400,12 +1401,5 @@
               push(new_id, right_id);
               pushRight(new_id, ~(classes[r].parent));
-
-              if (less(~classes[r].parent, right_id)) {
-                nodes[new_id].item = nodes[~classes[r].parent].item;
-                nodes[new_id].prio = nodes[~classes[r].parent].prio;
-              } else {
-                nodes[new_id].item = nodes[right_id].item;
-                nodes[new_id].prio = nodes[right_id].prio;
-              }
+              setPrio(new_id);
 
               id = nodes[id].parent;
@@ -1447,12 +1441,5 @@
               push(new_id, left_id);
               pushLeft(new_id, ~(classes[l].parent));
-
-              if (less(~classes[l].parent, left_id)) {
-                nodes[new_id].item = nodes[~classes[l].parent].item;
-                nodes[new_id].prio = nodes[~classes[l].parent].prio;
-              } else {
-                nodes[new_id].item = nodes[left_id].item;
-                nodes[new_id].prio = nodes[left_id].prio;
-              }
+              setPrio(new_id);
 
               id = nodes[id].parent;
