1.1 --- a/lemon/concept/ugraph.h Mon Jul 24 09:51:28 2006 +0000
1.2 +++ b/lemon/concept/ugraph.h Mon Jul 24 16:08:34 2006 +0000
1.3 @@ -35,31 +35,48 @@
1.4 /// @{
1.5
1.6
1.7 - /// Class describing the concept of Undirected Graphs.
1.8 -
1.9 + /// \brief Class describing the concept of Undirected Graphs.
1.10 + ///
1.11 /// This class describes the common interface of all Undirected
1.12 /// Graphs.
1.13 ///
1.14 /// As all concept describing classes it provides only interface
1.15 /// without any sensible implementation. So any algorithm for
1.16 /// undirected graph should compile with this class, but it will not
1.17 - /// run properly, of couse.
1.18 + /// run properly, of course.
1.19 ///
1.20 - /// In LEMON undirected graphs also fulfill the concept of directed
1.21 - /// graphs (\ref lemon::concept::Graph "Graph Concept"). For
1.22 - /// explanation of this and more see also the page \ref graphs,
1.23 - /// a tutorial about graphs.
1.24 + /// The LEMON undirected graphs also fulfill the concept of
1.25 + /// directed graphs (\ref lemon::concept::Graph "Graph
1.26 + /// Concept"). Each undirected edges can be seen as two opposite
1.27 + /// directed edge and consequently the undirected graph can be
1.28 + /// seen as the direceted graph of these directed edges. The
1.29 + /// UGraph has the UEdge inner class for the undirected edges and
1.30 + /// the Edge type for the directed edges. The Edge type is
1.31 + /// convertible to UEdge or inherited from it so from a directed
1.32 + /// edge we can get the represented undirected edge.
1.33 ///
1.34 - /// You can assume that all undirected graph can be handled
1.35 - /// as a directed graph. This way it is fully conform
1.36 - /// to the Graph concept.
1.37 -
1.38 + /// In the sense of the LEMON each undirected edge has a default
1.39 + /// direction (it should be in every computer implementation,
1.40 + /// because the order of undirected edge's nodes defines an
1.41 + /// orientation). With the default orientation we can define that
1.42 + /// the directed edge is forward or backward directed. With the \c
1.43 + /// direction() and \c direct() function we can get the direction
1.44 + /// of the directed edge and we can direct an undirected edge.
1.45 + ///
1.46 + /// The UEdgeIt is an iterator for the undirected edges. We can use
1.47 + /// the UEdgeMap to map values for the undirected edges. The InEdgeIt and
1.48 + /// OutEdgeIt iterates on the same undirected edges but with opposite
1.49 + /// direction. The IncEdgeIt iterates also on the same undirected edges
1.50 + /// as the OutEdgeIt and InEdgeIt but it is not convertible to Edge just
1.51 + /// to UEdge.
1.52 class UGraph {
1.53 public:
1.54 - ///\e
1.55 -
1.56 - ///\todo undocumented
1.57 + /// \brief The undirected graph should be tagged by the
1.58 + /// UndirectedTag.
1.59 ///
1.60 + /// The undirected graph should be tagged by the UndirectedTag. This
1.61 + /// tag helps the enable_if technics to make compile time
1.62 + /// specializations for undirected graphs.
1.63 typedef True UndirectedTag;
1.64
1.65 /// \brief The base type of node iterators,
1.66 @@ -296,7 +313,8 @@
1.67 /// The directed edge type.
1.68
1.69 /// The directed edge type. It can be converted to the
1.70 - /// undirected edge.
1.71 + /// undirected edge or it should be inherited from the undirected
1.72 + /// edge.
1.73 class Edge : public UEdge {
1.74 public:
1.75 /// Default constructor
1.76 @@ -562,16 +580,17 @@
1.77 /// \brief Direct the given undirected edge.
1.78 ///
1.79 /// Direct the given undirected edge. The returned edge source
1.80 - /// will be the given edge.
1.81 + /// will be the given node.
1.82 Edge direct(const UEdge&, const Node&) const {
1.83 return INVALID;
1.84 }
1.85
1.86 /// \brief Direct the given undirected edge.
1.87 ///
1.88 - /// Direct the given undirected edge. The returned edge source
1.89 - /// will be the source of the undirected edge if the given bool
1.90 - /// is true.
1.91 + /// Direct the given undirected edge. The returned edge
1.92 + /// represents the given undireted edge and the direction comes
1.93 + /// from the given bool. The source of the undirected edge and
1.94 + /// the directed edge is the same when the given bool is true.
1.95 Edge direct(const UEdge&, bool) const {
1.96 return INVALID;
1.97 }
1.98 @@ -579,7 +598,7 @@
1.99 /// \brief Returns true if the edge has default orientation.
1.100 ///
1.101 /// Returns whether the given directed edge is same orientation as
1.102 - /// the corresponding undirected edge.
1.103 + /// the corresponding undirected edge's default orientation.
1.104 bool direction(Edge) const { return true; }
1.105
1.106 /// \brief Returns the opposite directed edge.
1.107 @@ -589,16 +608,16 @@
1.108
1.109 /// \brief Opposite node on an edge
1.110 ///
1.111 - /// \return the opposite of the given Node on the given Edge
1.112 + /// \return the opposite of the given Node on the given UEdge
1.113 Node oppositeNode(Node, UEdge) const { return INVALID; }
1.114
1.115 /// \brief First node of the undirected edge.
1.116 ///
1.117 /// \return the first node of the given UEdge.
1.118 ///
1.119 - /// Naturally uectected edges don't have direction and thus
1.120 + /// Naturally undirected edges don't have direction and thus
1.121 /// don't have source and target node. But we use these two methods
1.122 - /// to query the two endnodes of the edge. The direction of the edge
1.123 + /// to query the two nodes of the edge. The direction of the edge
1.124 /// which arises this way is called the inherent direction of the
1.125 /// undirected edge, and is used to define the "default" direction
1.126 /// of the directed versions of the edges.