1.1 --- a/lemon/full_graph.h Thu Nov 05 10:01:02 2009 +0100
1.2 +++ b/lemon/full_graph.h Thu Nov 05 10:23:16 2009 +0100
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 + /// Returns the index of the given node. Since this structure is
1.95 + /// completely static, the nodes can be indexed with integers from
1.96 + /// the range <tt>[0..nodeNum()-1]</tt>.
1.97 + /// \sa operator()()
1.98 static int index(const Node& node) { return Parent::index(node); }
1.99
1.100 /// \brief Returns the arc connecting the given nodes.
1.101 ///
1.102 /// Returns the arc connecting the given nodes.
1.103 - Arc arc(const Node& u, const Node& v) const {
1.104 + Arc arc(Node u, Node v) const {
1.105 return Parent::arc(u, v);
1.106 }
1.107
1.108 @@ -520,21 +524,23 @@
1.109 ///
1.110 /// \brief An undirected full graph class.
1.111 ///
1.112 - /// This is a simple and fast undirected full graph
1.113 - /// implementation. From each node go edge to each other node,
1.114 - /// therefore the number of edges in the graph is \f$n(n-1)/2\f$.
1.115 - /// This graph type is completely static, so you can neither
1.116 - /// add nor delete either edges or nodes, and it needs constant
1.117 - /// space in memory.
1.118 + /// FullGraph is a simple and fast implmenetation of undirected full
1.119 + /// (complete) graphs. It contains an edge between every distinct pair
1.120 + /// of nodes, therefore the number of edges is <tt>n(n-1)/2</tt>.
1.121 + /// This class is completely static and it needs constant memory space.
1.122 + /// Thus you can neither add nor delete nodes or edges, however
1.123 + /// the structure can be resized using resize().
1.124 ///
1.125 - /// This class fully conforms to the \ref concepts::Graph "Graph concept".
1.126 + /// This type fully conforms to the \ref concepts::Graph "Graph concept".
1.127 + /// Most of its member functions and nested classes are documented
1.128 + /// only in the concept class.
1.129 ///
1.130 - /// The \c FullGraph and \c FullDigraph classes are very similar,
1.131 - /// but there are two differences. While the \c FullDigraph class
1.132 + /// \note FullDigraph and FullGraph classes are very similar,
1.133 + /// but there are two differences. While FullDigraph
1.134 /// conforms only to the \ref concepts::Digraph "Digraph" concept,
1.135 /// this class conforms to the \ref concepts::Graph "Graph" concept,
1.136 - /// moreover \c FullGraph does not contain a loop arc for each
1.137 - /// node as \c FullDigraph does.
1.138 + /// moreover this class does not contain a loop for each
1.139 + /// node as FullDigraph does.
1.140 ///
1.141 /// \sa FullDigraph
1.142 class FullGraph : public ExtendedFullGraphBase {
1.143 @@ -542,7 +548,9 @@
1.144
1.145 public:
1.146
1.147 - /// \brief Constructor
1.148 + /// \brief Default constructor.
1.149 + ///
1.150 + /// Default constructor. The number of nodes and edges will be zero.
1.151 FullGraph() { construct(0); }
1.152
1.153 /// \brief Constructor
1.154 @@ -553,8 +561,8 @@
1.155
1.156 /// \brief Resizes the graph
1.157 ///
1.158 - /// Resizes the graph. The function will fully destroy and
1.159 - /// rebuild the graph. This cause that the maps of the graph will
1.160 + /// This function resizes the graph. It fully destroys and
1.161 + /// rebuilds the structure, therefore the maps of the graph will be
1.162 /// reallocated automatically and the previous values will be lost.
1.163 void resize(int n) {
1.164 Parent::notifier(Arc()).clear();
1.165 @@ -568,31 +576,31 @@
1.166
1.167 /// \brief Returns the node with the given index.
1.168 ///
1.169 - /// Returns the node with the given index. Since it is a static
1.170 - /// graph its nodes can be indexed with integers from the range
1.171 - /// <tt>[0..nodeNum()-1]</tt>.
1.172 + /// Returns the node with the given index. Since this structure is
1.173 + /// completely static, the nodes can be indexed with integers from
1.174 + /// the range <tt>[0..nodeNum()-1]</tt>.
1.175 /// \sa index()
1.176 Node operator()(int ix) const { return Parent::operator()(ix); }
1.177
1.178 /// \brief Returns the index of the given node.
1.179 ///
1.180 - /// Returns the index of the given node. Since it is a static
1.181 - /// graph its nodes can be indexed with integers from the range
1.182 - /// <tt>[0..nodeNum()-1]</tt>.
1.183 - /// \sa operator()
1.184 + /// Returns the index of the given node. Since this structure is
1.185 + /// completely static, the nodes can be indexed with integers from
1.186 + /// the range <tt>[0..nodeNum()-1]</tt>.
1.187 + /// \sa operator()()
1.188 static int index(const Node& node) { return Parent::index(node); }
1.189
1.190 /// \brief Returns the arc connecting the given nodes.
1.191 ///
1.192 /// Returns the arc connecting the given nodes.
1.193 - Arc arc(const Node& s, const Node& t) const {
1.194 + Arc arc(Node s, Node t) const {
1.195 return Parent::arc(s, t);
1.196 }
1.197
1.198 - /// \brief Returns the edge connects the given nodes.
1.199 + /// \brief Returns the edge connecting the given nodes.
1.200 ///
1.201 - /// Returns the edge connects the given nodes.
1.202 - Edge edge(const Node& u, const Node& v) const {
1.203 + /// Returns the edge connecting the given nodes.
1.204 + Edge edge(Node u, Node v) const {
1.205 return Parent::edge(u, v);
1.206 }
1.207