lemon/concept/bpugraph.h
changeset 2163 bef3457be038
parent 2126 2c8adbee9fa6
child 2231 06faf3f06d67
     1.1 --- a/lemon/concept/bpugraph.h	Mon Jul 24 09:51:28 2006 +0000
     1.2 +++ b/lemon/concept/bpugraph.h	Mon Jul 24 16:08:34 2006 +0000
     1.3 @@ -55,11 +55,12 @@
     1.4      /// as an undirected graph and consequently as a static graph.
     1.5      ///
     1.6      /// The bipartite graph stores two types of nodes which are named
     1.7 -    /// ANode and BNode. The graph type contains two types ANode and BNode
     1.8 -    /// which are inherited from Node type. Moreover they have
     1.9 -    /// constructor which converts Node to either ANode or BNode when it is
    1.10 -    /// possible. Therefor everywhere the Node type can be used instead of
    1.11 -    /// ANode and BNode. So the usage of the ANode and BNode is suggested.  
    1.12 +    /// ANode and BNode. The graph type contains two types ANode and
    1.13 +    /// BNode which are inherited from Node type. Moreover they have
    1.14 +    /// constructor which converts Node to either ANode or BNode when
    1.15 +    /// it is possible. Therefor everywhere the Node type can be used
    1.16 +    /// instead of ANode and BNode. So the usage of the ANode and
    1.17 +    /// BNode is not suggested.
    1.18      ///
    1.19      /// The iteration on the partition can be done with the ANodeIt and 
    1.20      /// BNodeIt classes. The node map can be used to map values to the nodes
    1.21 @@ -68,8 +69,12 @@
    1.22  
    1.23      class BpUGraph {
    1.24      public:
    1.25 -      /// \todo undocumented
    1.26 +      /// \brief The undirected graph should be tagged by the
    1.27 +      /// UndirectedTag.
    1.28        ///
    1.29 +      /// The undirected graph should be tagged by the UndirectedTag. This
    1.30 +      /// tag helps the enable_if technics to make compile time 
    1.31 +      /// specializations for undirected graphs.  
    1.32        typedef True UndirectedTag;
    1.33  
    1.34        /// \brief The base type of node iterators, 
    1.35 @@ -122,15 +127,12 @@
    1.36  
    1.37        };
    1.38  
    1.39 -      /// \brief The base type of anode iterators, 
    1.40 -      /// or in other words, the trivial anode iterator.
    1.41 +      /// \brief Helper class for ANodes.
    1.42        ///
    1.43 -      /// This is the base type of each anode iterator,
    1.44 -      /// thus each kind of anode iterator converts to this.
    1.45 -      /// More precisely each kind of node iterator should be inherited 
    1.46 -      /// from the trivial anode iterator. The ANode class should be used
    1.47 -      /// only in special cases. Usually the Node type should be used insted
    1.48 -      /// of it. 
    1.49 +      /// This class is just a helper class for ANodes, it is not
    1.50 +      /// suggested to use it directly. It can be converted easily to
    1.51 +      /// node and vice versa. The usage of this class is limited
    1.52 +      /// two use just as template parameters for special map types. 
    1.53        class ANode {
    1.54        public:
    1.55          /// Default constructor
    1.56 @@ -179,15 +181,12 @@
    1.57  
    1.58        };
    1.59  
    1.60 -      /// \brief The base type of bnode iterators, 
    1.61 -      /// or in other words, the trivial bnode iterator.
    1.62 +      /// \brief Helper class for BNodes.
    1.63        ///
    1.64 -      /// This is the base type of each anode iterator,
    1.65 -      /// thus each kind of anode iterator converts to this.
    1.66 -      /// More precisely each kind of node iterator should be inherited 
    1.67 -      /// from the trivial anode iterator. The BNode class should be used
    1.68 -      /// only in special cases. Usually the Node type should be used insted
    1.69 -      /// of it. 
    1.70 +      /// This class is just a helper class for BNodes, it is not
    1.71 +      /// suggested to use it directly. It can be converted easily to
    1.72 +      /// node and vice versa. The usage of this class is limited
    1.73 +      /// two use just as template parameters for special map types. 
    1.74        class BNode {
    1.75        public:
    1.76          /// Default constructor
    1.77 @@ -290,7 +289,7 @@
    1.78        /// int count=0;
    1.79        /// for (Graph::ANodeIt n(g); n!=INVALID; ++n) ++count;
    1.80        ///\endcode
    1.81 -      class ANodeIt : public ANode {
    1.82 +      class ANodeIt : public Node {
    1.83        public:
    1.84          /// Default constructor
    1.85  
    1.86 @@ -335,7 +334,7 @@
    1.87        /// int count=0;
    1.88        /// for (Graph::BNodeIt n(g); n!=INVALID; ++n) ++count;
    1.89        ///\endcode
    1.90 -      class BNodeIt : public BNode {
    1.91 +      class BNodeIt : public Node {
    1.92        public:
    1.93          /// Default constructor
    1.94  
    1.95 @@ -818,16 +817,17 @@
    1.96        /// \brief Direct the given undirected edge.
    1.97        ///
    1.98        /// Direct the given undirected edge. The returned edge source
    1.99 -      /// will be the given edge.
   1.100 +      /// will be the given node.
   1.101        Edge direct(const UEdge&, const Node&) const {
   1.102  	return INVALID;
   1.103        }
   1.104  
   1.105        /// \brief Direct the given undirected edge.
   1.106        ///
   1.107 -      /// Direct the given undirected edge. The returned edge source
   1.108 -      /// will be the source of the undirected edge if the given bool
   1.109 -      /// is true.
   1.110 +      /// Direct the given undirected edge. The returned edge
   1.111 +      /// represents the given undireted edge and the direction comes
   1.112 +      /// from the given bool.  The source of the undirected edge and
   1.113 +      /// the directed edge is the same when the given bool is true.
   1.114        Edge direct(const UEdge&, bool) const {
   1.115  	return INVALID;
   1.116        }
   1.117 @@ -855,7 +855,7 @@
   1.118        /// \brief Returns true if the edge has default orientation.
   1.119        ///
   1.120        /// Returns whether the given directed edge is same orientation as
   1.121 -      /// the corresponding undirected edge.
   1.122 +      /// the corresponding undirected edge's default orientation.
   1.123        bool direction(Edge) const { return true; }
   1.124  
   1.125        /// \brief Returns the opposite directed edge.
   1.126 @@ -865,14 +865,14 @@
   1.127  
   1.128        /// \brief Opposite node on an edge
   1.129        ///
   1.130 -      /// \return the opposite of the given Node on the given Edge
   1.131 +      /// \return the opposite of the given Node on the given UEdge
   1.132        Node oppositeNode(Node, UEdge) const { return INVALID; }
   1.133  
   1.134        /// \brief First node of the undirected edge.
   1.135        ///
   1.136        /// \return the first node of the given UEdge.
   1.137        ///
   1.138 -      /// Naturally uectected edges don't have direction and thus
   1.139 +      /// Naturally undirected edges don't have direction and thus
   1.140        /// don't have source and target node. But we use these two methods
   1.141        /// to query the two endnodes of the edge. The direction of the edge
   1.142        /// which arises this way is called the inherent direction of the