Index: lemon/concepts/digraph.h
===================================================================
--- lemon/concepts/digraph.h	(revision 877)
+++ lemon/concepts/digraph.h	(revision 982)
@@ -3,5 +3,5 @@
  * This file is a part of LEMON, a generic C++ optimization library.
  *
- * Copyright (C) 2003-2010
+ * Copyright (C) 2003-2009
  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
  * (Egervary Research Group on Combinatorial Optimization, EGRES).
@@ -36,38 +36,44 @@
     /// \brief Class describing the concept of directed graphs.
     ///
-    /// This class describes the common interface of all directed
-    /// graphs (digraphs).
+    /// This class describes the \ref concept "concept" of the
+    /// immutable directed digraphs.
     ///
-    /// Like all concept classes, it only provides an interface
-    /// without any sensible implementation. So any general algorithm for
-    /// directed graphs should compile with this class, but it will not
-    /// run properly, of course.
-    /// An actual digraph implementation like \ref ListDigraph or
-    /// \ref SmartDigraph may have additional functionality.
+    /// Note that actual digraph implementation like @ref ListDigraph or
+    /// @ref SmartDigraph may have several additional functionality.
     ///
-    /// \sa Graph
+    /// \sa concept
     class Digraph {
     private:
-      /// Diraphs are \e not copy constructible. Use DigraphCopy instead.
-      Digraph(const Digraph &) {}
-      /// \brief Assignment of a digraph to another one is \e not allowed.
-      /// Use DigraphCopy instead.
+      ///Digraphs are \e not copy constructible. Use DigraphCopy() instead.
+
+      ///Digraphs are \e not copy constructible. Use DigraphCopy() instead.
+      ///
+      Digraph(const Digraph &) {};
+      ///\brief Assignment of \ref Digraph "Digraph"s to another ones are
+      ///\e not allowed. Use DigraphCopy() instead.
+
+      ///Assignment of \ref Digraph "Digraph"s to another ones are
+      ///\e not allowed.  Use DigraphCopy() instead.
+
       void operator=(const Digraph &) {}
-
     public:
-      /// Default constructor.
+      ///\e
+
+      /// Defalult constructor.
+
+      /// Defalult constructor.
+      ///
       Digraph() { }
-
-      /// The node type of the digraph
+      /// Class for identifying a node of the digraph
 
       /// This class identifies a node of the digraph. It also serves
       /// as a base class of the node iterators,
-      /// thus they convert to this type.
+      /// thus they will convert to this type.
       class Node {
       public:
         /// Default constructor
 
-        /// Default constructor.
-        /// \warning It sets the object to an undefined value.
+        /// @warning The default constructor sets the iterator
+        /// to an undefined value.
         Node() { }
         /// Copy constructor.
@@ -77,37 +83,38 @@
         Node(const Node&) { }
 
-        /// %Invalid constructor \& conversion.
-
-        /// Initializes the object to be invalid.
+        /// Invalid constructor \& conversion.
+
+        /// This constructor initializes the iterator to be invalid.
         /// \sa Invalid for more details.
         Node(Invalid) { }
         /// Equality operator
 
-        /// Equality operator.
-        ///
         /// Two iterators are equal if and only if they point to the
-        /// same object or both are \c INVALID.
+        /// same object or both are invalid.
         bool operator==(Node) const { return true; }
 
         /// Inequality operator
 
-        /// Inequality operator.
+        /// \sa operator==(Node n)
+        ///
         bool operator!=(Node) const { return true; }
 
         /// Artificial ordering operator.
 
-        /// Artificial ordering operator.
-        ///
-        /// \note This operator only has to define some strict ordering of
-        /// the nodes; this order has nothing to do with the iteration
-        /// ordering of the nodes.
+        /// To allow the use of digraph descriptors as key type in std::map or
+        /// similar associative container we require this.
+        ///
+        /// \note This operator only have to define some strict ordering of
+        /// the items; this order has nothing to do with the iteration
+        /// ordering of the items.
         bool operator<(Node) const { return false; }
-      };
-
-      /// Iterator class for the nodes.
-
-      /// This iterator goes through each node of the digraph.
-      /// Its usage is quite simple, for example, you can count the number
-      /// of nodes in a digraph \c g of type \c %Digraph like this:
+
+      };
+
+      /// This iterator goes through each node.
+
+      /// This iterator goes through each node.
+      /// Its usage is quite simple, for example you can count the number
+      /// of nodes in digraph \c g of type \c Digraph like this:
       ///\code
       /// int count=0;
@@ -118,6 +125,6 @@
         /// Default constructor
 
-        /// Default constructor.
-        /// \warning It sets the iterator to an undefined value.
+        /// @warning The default constructor sets the iterator
+        /// to an undefined value.
         NodeIt() { }
         /// Copy constructor.
@@ -126,18 +133,20 @@
         ///
         NodeIt(const NodeIt& n) : Node(n) { }
-        /// %Invalid constructor \& conversion.
-
-        /// Initializes the iterator to be invalid.
+        /// Invalid constructor \& conversion.
+
+        /// Initialize the iterator to be invalid.
         /// \sa Invalid for more details.
         NodeIt(Invalid) { }
         /// Sets the iterator to the first node.
 
-        /// Sets the iterator to the first node of the given digraph.
-        ///
-        explicit NodeIt(const Digraph&) { }
-        /// Sets the iterator to the given node.
-
-        /// Sets the iterator to the given node of the given digraph.
-        ///
+        /// Sets the iterator to the first node of \c g.
+        ///
+        NodeIt(const Digraph&) { }
+        /// Node -> NodeIt conversion.
+
+        /// Sets the iterator to the node of \c the digraph pointed by
+        /// the trivial iterator.
+        /// This feature necessitates that each time we
+        /// iterate the arc-set, the iteration order is the same.
         NodeIt(const Digraph&, const Node&) { }
         /// Next node.
@@ -149,5 +158,5 @@
 
 
-      /// The arc type of the digraph
+      /// Class for identifying an arc of the digraph
 
       /// This class identifies an arc of the digraph. It also serves
@@ -158,6 +167,6 @@
         /// Default constructor
 
-        /// Default constructor.
-        /// \warning It sets the object to an undefined value.
+        /// @warning The default constructor sets the iterator
+        /// to an undefined value.
         Arc() { }
         /// Copy constructor.
@@ -166,48 +175,49 @@
         ///
         Arc(const Arc&) { }
-        /// %Invalid constructor \& conversion.
-
-        /// Initializes the object to be invalid.
-        /// \sa Invalid for more details.
+        /// Initialize the iterator to be invalid.
+
+        /// Initialize the iterator to be invalid.
+        ///
         Arc(Invalid) { }
         /// Equality operator
 
-        /// Equality operator.
-        ///
         /// Two iterators are equal if and only if they point to the
-        /// same object or both are \c INVALID.
+        /// same object or both are invalid.
         bool operator==(Arc) const { return true; }
         /// Inequality operator
 
-        /// Inequality operator.
+        /// \sa operator==(Arc n)
+        ///
         bool operator!=(Arc) const { return true; }
 
         /// Artificial ordering operator.
 
-        /// Artificial ordering operator.
-        ///
-        /// \note This operator only has to define some strict ordering of
-        /// the arcs; this order has nothing to do with the iteration
-        /// ordering of the arcs.
+        /// To allow the use of digraph descriptors as key type in std::map or
+        /// similar associative container we require this.
+        ///
+        /// \note This operator only have to define some strict ordering of
+        /// the items; this order has nothing to do with the iteration
+        /// ordering of the items.
         bool operator<(Arc) const { return false; }
       };
 
-      /// Iterator class for the outgoing arcs of a node.
+      /// This iterator goes trough the outgoing arcs of a node.
 
       /// This iterator goes trough the \e outgoing arcs of a certain node
       /// of a digraph.
-      /// Its usage is quite simple, for example, you can count the number
+      /// Its usage is quite simple, for example you can count the number
       /// of outgoing arcs of a node \c n
-      /// in a digraph \c g of type \c %Digraph as follows.
+      /// in digraph \c g of type \c Digraph as follows.
       ///\code
       /// int count=0;
-      /// for (Digraph::OutArcIt a(g, n); a!=INVALID; ++a) ++count;
+      /// for (Digraph::OutArcIt e(g, n); e!=INVALID; ++e) ++count;
       ///\endcode
+
       class OutArcIt : public Arc {
       public:
         /// Default constructor
 
-        /// Default constructor.
-        /// \warning It sets the iterator to an undefined value.
+        /// @warning The default constructor sets the iterator
+        /// to an undefined value.
         OutArcIt() { }
         /// Copy constructor.
@@ -216,20 +226,21 @@
         ///
         OutArcIt(const OutArcIt& e) : Arc(e) { }
-        /// %Invalid constructor \& conversion.
-
-        /// Initializes the iterator to be invalid.
-        /// \sa Invalid for more details.
+        /// Initialize the iterator to be invalid.
+
+        /// Initialize the iterator to be invalid.
+        ///
         OutArcIt(Invalid) { }
-        /// Sets the iterator to the first outgoing arc.
-
-        /// Sets the iterator to the first outgoing arc of the given node.
-        ///
+        /// This constructor sets the iterator to the first outgoing arc.
+
+        /// This constructor sets the iterator to the first outgoing arc of
+        /// the node.
         OutArcIt(const Digraph&, const Node&) { }
-        /// Sets the iterator to the given arc.
-
-        /// Sets the iterator to the given arc of the given digraph.
-        ///
+        /// Arc -> OutArcIt conversion
+
+        /// Sets the iterator to the value of the trivial iterator.
+        /// This feature necessitates that each time we
+        /// iterate the arc-set, the iteration order is the same.
         OutArcIt(const Digraph&, const Arc&) { }
-        /// Next outgoing arc
+        ///Next outgoing arc
 
         /// Assign the iterator to the next
@@ -238,21 +249,22 @@
       };
 
-      /// Iterator class for the incoming arcs of a node.
+      /// This iterator goes trough the incoming arcs of a node.
 
       /// This iterator goes trough the \e incoming arcs of a certain node
       /// of a digraph.
-      /// Its usage is quite simple, for example, you can count the number
-      /// of incoming arcs of a node \c n
-      /// in a digraph \c g of type \c %Digraph as follows.
+      /// Its usage is quite simple, for example you can count the number
+      /// of outgoing arcs of a node \c n
+      /// in digraph \c g of type \c Digraph as follows.
       ///\code
       /// int count=0;
-      /// for(Digraph::InArcIt a(g, n); a!=INVALID; ++a) ++count;
+      /// for(Digraph::InArcIt e(g, n); e!=INVALID; ++e) ++count;
       ///\endcode
+
       class InArcIt : public Arc {
       public:
         /// Default constructor
 
-        /// Default constructor.
-        /// \warning It sets the iterator to an undefined value.
+        /// @warning The default constructor sets the iterator
+        /// to an undefined value.
         InArcIt() { }
         /// Copy constructor.
@@ -261,34 +273,34 @@
         ///
         InArcIt(const InArcIt& e) : Arc(e) { }
-        /// %Invalid constructor \& conversion.
-
-        /// Initializes the iterator to be invalid.
-        /// \sa Invalid for more details.
+        /// Initialize the iterator to be invalid.
+
+        /// Initialize the iterator to be invalid.
+        ///
         InArcIt(Invalid) { }
-        /// Sets the iterator to the first incoming arc.
-
-        /// Sets the iterator to the first incoming arc of the given node.
-        ///
+        /// This constructor sets the iterator to first incoming arc.
+
+        /// This constructor set the iterator to the first incoming arc of
+        /// the node.
         InArcIt(const Digraph&, const Node&) { }
-        /// Sets the iterator to the given arc.
-
-        /// Sets the iterator to the given arc of the given digraph.
-        ///
+        /// Arc -> InArcIt conversion
+
+        /// Sets the iterator to the value of the trivial iterator \c e.
+        /// This feature necessitates that each time we
+        /// iterate the arc-set, the iteration order is the same.
         InArcIt(const Digraph&, const Arc&) { }
         /// Next incoming arc
 
-        /// Assign the iterator to the next
-        /// incoming arc of the corresponding node.
+        /// Assign the iterator to the next inarc of the corresponding node.
+        ///
         InArcIt& operator++() { return *this; }
       };
-
-      /// Iterator class for the arcs.
-
-      /// This iterator goes through each arc of the digraph.
-      /// Its usage is quite simple, for example, you can count the number
-      /// of arcs in a digraph \c g of type \c %Digraph as follows:
+      /// This iterator goes through each arc.
+
+      /// This iterator goes through each arc of a digraph.
+      /// Its usage is quite simple, for example you can count the number
+      /// of arcs in a digraph \c g of type \c Digraph as follows:
       ///\code
       /// int count=0;
-      /// for(Digraph::ArcIt a(g); a!=INVALID; ++a) ++count;
+      /// for(Digraph::ArcIt e(g); e!=INVALID; ++e) ++count;
       ///\endcode
       class ArcIt : public Arc {
@@ -296,6 +308,6 @@
         /// Default constructor
 
-        /// Default constructor.
-        /// \warning It sets the iterator to an undefined value.
+        /// @warning The default constructor sets the iterator
+        /// to an undefined value.
         ArcIt() { }
         /// Copy constructor.
@@ -304,66 +316,56 @@
         ///
         ArcIt(const ArcIt& e) : Arc(e) { }
-        /// %Invalid constructor \& conversion.
-
-        /// Initializes the iterator to be invalid.
-        /// \sa Invalid for more details.
+        /// Initialize the iterator to be invalid.
+
+        /// Initialize the iterator to be invalid.
+        ///
         ArcIt(Invalid) { }
-        /// Sets the iterator to the first arc.
-
-        /// Sets the iterator to the first arc of the given digraph.
-        ///
-        explicit ArcIt(const Digraph& g) { ignore_unused_variable_warning(g); }
-        /// Sets the iterator to the given arc.
-
-        /// Sets the iterator to the given arc of the given digraph.
-        ///
+        /// This constructor sets the iterator to the first arc.
+
+        /// This constructor sets the iterator to the first arc of \c g.
+        ///@param g the digraph
+        ArcIt(const Digraph& g) { ::lemon::ignore_unused_variable_warning(g); }
+        /// Arc -> ArcIt conversion
+
+        /// Sets the iterator to the value of the trivial iterator \c e.
+        /// This feature necessitates that each time we
+        /// iterate the arc-set, the iteration order is the same.
         ArcIt(const Digraph&, const Arc&) { }
-        /// Next arc
+        ///Next arc
 
         /// Assign the iterator to the next arc.
-        ///
         ArcIt& operator++() { return *this; }
       };
-
-      /// \brief The source node of the arc.
-      ///
-      /// Returns the source node of the given arc.
+      ///Gives back the target node of an arc.
+
+      ///Gives back the target node of an arc.
+      ///
+      Node target(Arc) const { return INVALID; }
+      ///Gives back the source node of an arc.
+
+      ///Gives back the source node of an arc.
+      ///
       Node source(Arc) const { return INVALID; }
 
-      /// \brief The target node of the arc.
-      ///
-      /// Returns the target node of the given arc.
-      Node target(Arc) const { return INVALID; }
-
-      /// \brief The ID of the node.
-      ///
-      /// Returns the ID of the given node.
+      /// \brief Returns the ID of the node.
       int id(Node) const { return -1; }
 
-      /// \brief The ID of the arc.
-      ///
-      /// Returns the ID of the given arc.
+      /// \brief Returns the ID of the arc.
       int id(Arc) const { return -1; }
 
-      /// \brief The node with the given ID.
-      ///
-      /// Returns the node with the given ID.
-      /// \pre The argument should be a valid node ID in the digraph.
+      /// \brief Returns the node with the given ID.
+      ///
+      /// \pre The argument should be a valid node ID in the graph.
       Node nodeFromId(int) const { return INVALID; }
 
-      /// \brief The arc with the given ID.
-      ///
-      /// Returns the arc with the given ID.
-      /// \pre The argument should be a valid arc ID in the digraph.
+      /// \brief Returns the arc with the given ID.
+      ///
+      /// \pre The argument should be a valid arc ID in the graph.
       Arc arcFromId(int) const { return INVALID; }
 
-      /// \brief An upper bound on the node IDs.
-      ///
-      /// Returns an upper bound on the node IDs.
+      /// \brief Returns an upper bound on the node IDs.
       int maxNodeId() const { return -1; }
 
-      /// \brief An upper bound on the arc IDs.
-      ///
-      /// Returns an upper bound on the arc IDs.
+      /// \brief Returns an upper bound on the arc IDs.
       int maxArcId() const { return -1; }
 
@@ -391,49 +393,48 @@
       int maxId(Arc) const { return -1; }
 
-      /// \brief The opposite node on the arc.
-      ///
-      /// Returns the opposite node on the given arc.
-      Node oppositeNode(Node, Arc) const { return INVALID; }
-
       /// \brief The base node of the iterator.
       ///
-      /// Returns the base node of the given outgoing arc iterator
-      /// (i.e. the source node of the corresponding arc).
-      Node baseNode(OutArcIt) const { return INVALID; }
+      /// Gives back the base node of the iterator.
+      /// It is always the target of the pointed arc.
+      Node baseNode(const InArcIt&) const { return INVALID; }
 
       /// \brief The running node of the iterator.
       ///
-      /// Returns the running node of the given outgoing arc iterator
-      /// (i.e. the target node of the corresponding arc).
-      Node runningNode(OutArcIt) const { return INVALID; }
+      /// Gives back the running node of the iterator.
+      /// It is always the source of the pointed arc.
+      Node runningNode(const InArcIt&) const { return INVALID; }
 
       /// \brief The base node of the iterator.
       ///
-      /// Returns the base node of the given incomming arc iterator
-      /// (i.e. the target node of the corresponding arc).
-      Node baseNode(InArcIt) const { return INVALID; }
+      /// Gives back the base node of the iterator.
+      /// It is always the source of the pointed arc.
+      Node baseNode(const OutArcIt&) const { return INVALID; }
 
       /// \brief The running node of the iterator.
       ///
-      /// Returns the running node of the given incomming arc iterator
-      /// (i.e. the source node of the corresponding arc).
-      Node runningNode(InArcIt) const { return INVALID; }
-
-      /// \brief Standard graph map type for the nodes.
-      ///
-      /// Standard graph map type for the nodes.
-      /// It conforms to the ReferenceMap concept.
+      /// Gives back the running node of the iterator.
+      /// It is always the target of the pointed arc.
+      Node runningNode(const OutArcIt&) const { return INVALID; }
+
+      /// \brief The opposite node on the given arc.
+      ///
+      /// Gives back the opposite node on the given arc.
+      Node oppositeNode(const Node&, const Arc&) const { return INVALID; }
+
+      /// \brief Reference map of the nodes to type \c T.
+      ///
+      /// Reference map of the nodes to type \c T.
       template<class T>
       class NodeMap : public ReferenceMap<Node, T, T&, const T&> {
       public:
 
-        /// Constructor
-        explicit NodeMap(const Digraph&) { }
-        /// Constructor with given initial value
+        ///\e
+        NodeMap(const Digraph&) { }
+        ///\e
         NodeMap(const Digraph&, T) { }
 
       private:
         ///Copy constructor
-        NodeMap(const NodeMap& nm) :
+        NodeMap(const NodeMap& nm) : 
           ReferenceMap<Node, T, T&, const T&>(nm) { }
         ///Assignment operator
@@ -445,17 +446,15 @@
       };
 
-      /// \brief Standard graph map type for the arcs.
-      ///
-      /// Standard graph map type for the arcs.
-      /// It conforms to the ReferenceMap concept.
+      /// \brief Reference map of the arcs to type \c T.
+      ///
+      /// Reference map of the arcs to type \c T.
       template<class T>
       class ArcMap : public ReferenceMap<Arc, T, T&, const T&> {
       public:
 
-        /// Constructor
-        explicit ArcMap(const Digraph&) { }
-        /// Constructor with given initial value
+        ///\e
+        ArcMap(const Digraph&) { }
+        ///\e
         ArcMap(const Digraph&, T) { }
-
       private:
         ///Copy constructor
