lemon/full_graph.h
changeset 782 853fcddcf282
parent 664 4137ef9aacc6
child 827 580af8cf2f6a
     1.1 --- a/lemon/full_graph.h	Sun Aug 23 11:07:50 2009 +0200
     1.2 +++ b/lemon/full_graph.h	Sun Aug 23 11:09:22 2009 +0200
     1.3 @@ -24,7 +24,7 @@
     1.4  
     1.5  ///\ingroup graphs
     1.6  ///\file
     1.7 -///\brief FullGraph and FullDigraph classes.
     1.8 +///\brief FullDigraph and FullGraph classes.
     1.9  
    1.10  namespace lemon {
    1.11  
    1.12 @@ -148,24 +148,26 @@
    1.13  
    1.14    /// \ingroup graphs
    1.15    ///
    1.16 -  /// \brief A full digraph class.
    1.17 +  /// \brief A directed full graph class.
    1.18    ///
    1.19 -  /// This is a simple and fast directed full graph implementation.
    1.20 -  /// From each node go arcs to each node (including the source node),
    1.21 -  /// therefore the number of the arcs in the digraph is the square of
    1.22 -  /// the node number. This digraph type is completely static, so you
    1.23 -  /// can neither add nor delete either arcs or nodes, and it needs
    1.24 -  /// constant space in memory.
    1.25 +  /// FullDigraph is a simple and fast implmenetation of directed full
    1.26 +  /// (complete) graphs. It contains an arc from each node to each node
    1.27 +  /// (including a loop for each node), therefore the number of arcs
    1.28 +  /// is the square of the number of nodes.
    1.29 +  /// This class is completely static and it needs constant memory space.
    1.30 +  /// Thus you can neither add nor delete nodes or arcs, however
    1.31 +  /// the structure can be resized using resize().
    1.32    ///
    1.33 -  /// This class fully conforms to the \ref concepts::Digraph
    1.34 -  /// "Digraph concept".
    1.35 +  /// This type fully conforms to the \ref concepts::Digraph "Digraph concept".
    1.36 +  /// Most of its member functions and nested classes are documented
    1.37 +  /// only in the concept class.
    1.38    ///
    1.39 -  /// The \c FullDigraph and \c FullGraph classes are very similar,
    1.40 +  /// \note FullDigraph and FullGraph classes are very similar,
    1.41    /// but there are two differences. While this class conforms only
    1.42 -  /// to the \ref concepts::Digraph "Digraph" concept, the \c FullGraph
    1.43 -  /// class conforms to the \ref concepts::Graph "Graph" concept,
    1.44 -  /// moreover \c FullGraph does not contain a loop arc for each
    1.45 -  /// node as \c FullDigraph does.
    1.46 +  /// to the \ref concepts::Digraph "Digraph" concept, FullGraph
    1.47 +  /// conforms to the \ref concepts::Graph "Graph" concept,
    1.48 +  /// moreover FullGraph does not contain a loop for each
    1.49 +  /// node as this class does.
    1.50    ///
    1.51    /// \sa FullGraph
    1.52    class FullDigraph : public ExtendedFullDigraphBase {
    1.53 @@ -173,7 +175,9 @@
    1.54  
    1.55    public:
    1.56  
    1.57 -    /// \brief Constructor
    1.58 +    /// \brief Default constructor.
    1.59 +    ///
    1.60 +    /// Default constructor. The number of nodes and arcs will be zero.
    1.61      FullDigraph() { construct(0); }
    1.62  
    1.63      /// \brief Constructor
    1.64 @@ -184,8 +188,8 @@
    1.65  
    1.66      /// \brief Resizes the digraph
    1.67      ///
    1.68 -    /// Resizes the digraph. The function will fully destroy and
    1.69 -    /// rebuild the digraph. This cause that the maps of the digraph will
    1.70 +    /// This function resizes the digraph. It fully destroys and
    1.71 +    /// rebuilds the structure, therefore the maps of the digraph will be
    1.72      /// reallocated automatically and the previous values will be lost.
    1.73      void resize(int n) {
    1.74        Parent::notifier(Arc()).clear();
    1.75 @@ -197,24 +201,24 @@
    1.76  
    1.77      /// \brief Returns the node with the given index.
    1.78      ///
    1.79 -    /// Returns the node with the given index. Since it is a static
    1.80 -    /// digraph its nodes can be indexed with integers from the range
    1.81 -    /// <tt>[0..nodeNum()-1]</tt>.
    1.82 +    /// Returns the node with the given index. Since this structure is 
    1.83 +    /// completely static, the nodes can be indexed with integers from
    1.84 +    /// the range <tt>[0..nodeNum()-1]</tt>.
    1.85      /// \sa index()
    1.86      Node operator()(int ix) const { return Parent::operator()(ix); }
    1.87  
    1.88      /// \brief Returns the index of the given node.
    1.89      ///
    1.90 -    /// Returns the index of the given node. Since it is a static
    1.91 -    /// digraph its nodes can be indexed with integers from the range
    1.92 -    /// <tt>[0..nodeNum()-1]</tt>.
    1.93 -    /// \sa operator()
    1.94 -    int index(const Node& node) const { return Parent::index(node); }
    1.95 +    /// Returns the index of the given node. Since this structure is 
    1.96 +    /// completely static, the nodes can be indexed with integers from
    1.97 +    /// the range <tt>[0..nodeNum()-1]</tt>.
    1.98 +    /// \sa operator()()
    1.99 +    int index(Node node) const { return Parent::index(node); }
   1.100  
   1.101      /// \brief Returns the arc connecting the given nodes.
   1.102      ///
   1.103      /// Returns the arc connecting the given nodes.
   1.104 -    Arc arc(const Node& u, const Node& v) const {
   1.105 +    Arc arc(Node u, Node v) const {
   1.106        return Parent::arc(u, v);
   1.107      }
   1.108  
   1.109 @@ -520,21 +524,23 @@
   1.110    ///
   1.111    /// \brief An undirected full graph class.
   1.112    ///
   1.113 -  /// This is a simple and fast undirected full graph
   1.114 -  /// implementation. From each node go edge to each other node,
   1.115 -  /// therefore the number of edges in the graph is \f$n(n-1)/2\f$.
   1.116 -  /// This graph type is completely static, so you can neither
   1.117 -  /// add nor delete either edges or nodes, and it needs constant
   1.118 -  /// space in memory.
   1.119 +  /// FullGraph is a simple and fast implmenetation of undirected full
   1.120 +  /// (complete) graphs. It contains an edge between every distinct pair
   1.121 +  /// of nodes, therefore the number of edges is <tt>n(n-1)/2</tt>.
   1.122 +  /// This class is completely static and it needs constant memory space.
   1.123 +  /// Thus you can neither add nor delete nodes or edges, however
   1.124 +  /// the structure can be resized using resize().
   1.125    ///
   1.126 -  /// This class fully conforms to the \ref concepts::Graph "Graph concept".
   1.127 +  /// This type fully conforms to the \ref concepts::Graph "Graph concept".
   1.128 +  /// Most of its member functions and nested classes are documented
   1.129 +  /// only in the concept class.
   1.130    ///
   1.131 -  /// The \c FullGraph and \c FullDigraph classes are very similar,
   1.132 -  /// but there are two differences. While the \c FullDigraph class
   1.133 +  /// \note FullDigraph and FullGraph classes are very similar,
   1.134 +  /// but there are two differences. While FullDigraph
   1.135    /// conforms only to the \ref concepts::Digraph "Digraph" concept,
   1.136    /// this class conforms to the \ref concepts::Graph "Graph" concept,
   1.137 -  /// moreover \c FullGraph does not contain a loop arc for each
   1.138 -  /// node as \c FullDigraph does.
   1.139 +  /// moreover this class does not contain a loop for each
   1.140 +  /// node as FullDigraph does.
   1.141    ///
   1.142    /// \sa FullDigraph
   1.143    class FullGraph : public ExtendedFullGraphBase {
   1.144 @@ -542,7 +548,9 @@
   1.145  
   1.146    public:
   1.147  
   1.148 -    /// \brief Constructor
   1.149 +    /// \brief Default constructor.
   1.150 +    ///
   1.151 +    /// Default constructor. The number of nodes and edges will be zero.
   1.152      FullGraph() { construct(0); }
   1.153  
   1.154      /// \brief Constructor
   1.155 @@ -553,8 +561,8 @@
   1.156  
   1.157      /// \brief Resizes the graph
   1.158      ///
   1.159 -    /// Resizes the graph. The function will fully destroy and
   1.160 -    /// rebuild the graph. This cause that the maps of the graph will
   1.161 +    /// This function resizes the graph. It fully destroys and
   1.162 +    /// rebuilds the structure, therefore the maps of the graph will be
   1.163      /// reallocated automatically and the previous values will be lost.
   1.164      void resize(int n) {
   1.165        Parent::notifier(Arc()).clear();
   1.166 @@ -568,31 +576,31 @@
   1.167  
   1.168      /// \brief Returns the node with the given index.
   1.169      ///
   1.170 -    /// Returns the node with the given index. Since it is a static
   1.171 -    /// graph its nodes can be indexed with integers from the range
   1.172 -    /// <tt>[0..nodeNum()-1]</tt>.
   1.173 +    /// Returns the node with the given index. Since this structure is 
   1.174 +    /// completely static, the nodes can be indexed with integers from
   1.175 +    /// the range <tt>[0..nodeNum()-1]</tt>.
   1.176      /// \sa index()
   1.177      Node operator()(int ix) const { return Parent::operator()(ix); }
   1.178  
   1.179      /// \brief Returns the index of the given node.
   1.180      ///
   1.181 -    /// Returns the index of the given node. Since it is a static
   1.182 -    /// graph its nodes can be indexed with integers from the range
   1.183 -    /// <tt>[0..nodeNum()-1]</tt>.
   1.184 -    /// \sa operator()
   1.185 -    int index(const Node& node) const { return Parent::index(node); }
   1.186 +    /// Returns the index of the given node. Since this structure is 
   1.187 +    /// completely static, the nodes can be indexed with integers from
   1.188 +    /// the range <tt>[0..nodeNum()-1]</tt>.
   1.189 +    /// \sa operator()()
   1.190 +    int index(Node node) const { return Parent::index(node); }
   1.191  
   1.192      /// \brief Returns the arc connecting the given nodes.
   1.193      ///
   1.194      /// Returns the arc connecting the given nodes.
   1.195 -    Arc arc(const Node& s, const Node& t) const {
   1.196 +    Arc arc(Node s, Node t) const {
   1.197        return Parent::arc(s, t);
   1.198      }
   1.199  
   1.200 -    /// \brief Returns the edge connects the given nodes.
   1.201 +    /// \brief Returns the edge connecting the given nodes.
   1.202      ///
   1.203 -    /// Returns the edge connects the given nodes.
   1.204 -    Edge edge(const Node& u, const Node& v) const {
   1.205 +    /// Returns the edge connecting the given nodes.
   1.206 +    Edge edge(Node u, Node v) const {
   1.207        return Parent::edge(u, v);
   1.208      }
   1.209