diff -r 6831fa007688 -r bef3457be038 lemon/concept/ugraph.h --- a/lemon/concept/ugraph.h Mon Jul 24 09:51:28 2006 +0000 +++ b/lemon/concept/ugraph.h Mon Jul 24 16:08:34 2006 +0000 @@ -35,31 +35,48 @@ /// @{ - /// Class describing the concept of Undirected Graphs. - + /// \brief Class describing the concept of Undirected Graphs. + /// /// This class describes the common interface of all Undirected /// Graphs. /// /// As all concept describing classes it provides only interface /// without any sensible implementation. So any algorithm for /// undirected graph should compile with this class, but it will not - /// run properly, of couse. + /// run properly, of course. /// - /// In LEMON undirected graphs also fulfill the concept of directed - /// graphs (\ref lemon::concept::Graph "Graph Concept"). For - /// explanation of this and more see also the page \ref graphs, - /// a tutorial about graphs. + /// The LEMON undirected graphs also fulfill the concept of + /// directed graphs (\ref lemon::concept::Graph "Graph + /// Concept"). Each undirected edges can be seen as two opposite + /// directed edge and consequently the undirected graph can be + /// seen as the direceted graph of these directed edges. The + /// UGraph has the UEdge inner class for the undirected edges and + /// the Edge type for the directed edges. The Edge type is + /// convertible to UEdge or inherited from it so from a directed + /// edge we can get the represented undirected edge. /// - /// You can assume that all undirected graph can be handled - /// as a directed graph. This way it is fully conform - /// to the Graph concept. - + /// In the sense of the LEMON each undirected edge has a default + /// direction (it should be in every computer implementation, + /// because the order of undirected edge's nodes defines an + /// orientation). With the default orientation we can define that + /// the directed edge is forward or backward directed. With the \c + /// direction() and \c direct() function we can get the direction + /// of the directed edge and we can direct an undirected edge. + /// + /// The UEdgeIt is an iterator for the undirected edges. We can use + /// the UEdgeMap to map values for the undirected edges. The InEdgeIt and + /// OutEdgeIt iterates on the same undirected edges but with opposite + /// direction. The IncEdgeIt iterates also on the same undirected edges + /// as the OutEdgeIt and InEdgeIt but it is not convertible to Edge just + /// to UEdge. class UGraph { public: - ///\e - - ///\todo undocumented + /// \brief The undirected graph should be tagged by the + /// UndirectedTag. /// + /// The undirected graph should be tagged by the UndirectedTag. This + /// tag helps the enable_if technics to make compile time + /// specializations for undirected graphs. typedef True UndirectedTag; /// \brief The base type of node iterators, @@ -296,7 +313,8 @@ /// The directed edge type. /// The directed edge type. It can be converted to the - /// undirected edge. + /// undirected edge or it should be inherited from the undirected + /// edge. class Edge : public UEdge { public: /// Default constructor @@ -562,16 +580,17 @@ /// \brief Direct the given undirected edge. /// /// Direct the given undirected edge. The returned edge source - /// will be the given edge. + /// will be the given node. Edge direct(const UEdge&, const Node&) const { return INVALID; } /// \brief Direct the given undirected edge. /// - /// Direct the given undirected edge. The returned edge source - /// will be the source of the undirected edge if the given bool - /// is true. + /// Direct the given undirected edge. The returned edge + /// represents the given undireted edge and the direction comes + /// from the given bool. The source of the undirected edge and + /// the directed edge is the same when the given bool is true. Edge direct(const UEdge&, bool) const { return INVALID; } @@ -579,7 +598,7 @@ /// \brief Returns true if the edge has default orientation. /// /// Returns whether the given directed edge is same orientation as - /// the corresponding undirected edge. + /// the corresponding undirected edge's default orientation. bool direction(Edge) const { return true; } /// \brief Returns the opposite directed edge. @@ -589,16 +608,16 @@ /// \brief Opposite node on an edge /// - /// \return the opposite of the given Node on the given Edge + /// \return the opposite of the given Node on the given UEdge Node oppositeNode(Node, UEdge) const { return INVALID; } /// \brief First node of the undirected edge. /// /// \return the first node of the given UEdge. /// - /// Naturally uectected edges don't have direction and thus + /// Naturally undirected edges don't have direction and thus /// don't have source and target node. But we use these two methods - /// to query the two endnodes of the edge. The direction of the edge + /// to query the two nodes of the edge. The direction of the edge /// which arises this way is called the inherent direction of the /// undirected edge, and is used to define the "default" direction /// of the directed versions of the edges.