lemon/topology.h
changeset 1763 49045f2d28d4
parent 1750 5c76ebbb4818
child 1767 58455e2aa13e
     1.1 --- a/lemon/topology.h	Fri Nov 04 13:53:22 2005 +0000
     1.2 +++ b/lemon/topology.h	Fri Nov 04 14:48:10 2005 +0000
     1.3 @@ -110,12 +110,16 @@
     1.4    ///
     1.5    /// Find the connected components of an undirected graph.
     1.6    ///
     1.7 +  /// \image html connected_components.png
     1.8 +  /// \image latex connected_components.eps "Connected components" width=\textwidth
     1.9 +  ///
    1.10    /// \param g The graph. In must be undirected.
    1.11    /// \retval comp A writable node map. The values will be set from 0 to
    1.12    /// the number of the connected components minus one. Each values of the map
    1.13    /// will be set exactly once, the values of a certain component will be
    1.14    /// set continuously.
    1.15    /// \return The number of components
    1.16 +  ///
    1.17    template <class UndirGraph, class NodeMap>
    1.18    int connectedComponents(const UndirGraph &graph, NodeMap &compMap) {
    1.19      checkConcept<concept::UndirGraph, UndirGraph>();
    1.20 @@ -348,12 +352,16 @@
    1.21    /// relation on the nodes of the graph. Two nodes are in relationship
    1.22    /// when there are directed paths between them in both direction.
    1.23    ///
    1.24 +  /// \image html strongly_connected_components.png
    1.25 +  /// \image latex strongly_connected_components.eps "Strongly connected components" width=\textwidth
    1.26 +  ///
    1.27    /// \param g The graph.
    1.28    /// \retval comp A writable node map. The values will be set from 0 to
    1.29    /// the number of the strongly connected components minus one. Each values 
    1.30    /// of the map will be set exactly once, the values of a certain component 
    1.31    /// will be set continuously.
    1.32    /// \return The number of components
    1.33 +  ///
    1.34    template <typename Graph, typename NodeMap>
    1.35    int stronglyConnectedComponents(const Graph& graph, NodeMap& compMap) {
    1.36      checkConcept<concept::StaticGraph, Graph>();
    1.37 @@ -746,12 +754,16 @@
    1.38    /// relation on the undirected edges. Two undirected edge are in relationship
    1.39    /// when they are on same circle.
    1.40    ///
    1.41 +  /// \image html node_biconnected_components.png
    1.42 +  /// \image latex node_biconnected_components.eps "Node biconnected components" width=\textwidth
    1.43 +  ///
    1.44    /// \param graph The graph.
    1.45    /// \retval comp A writable undir edge map. The values will be set from 0 to
    1.46    /// the number of the biconnected components minus one. Each values 
    1.47    /// of the map will be set exactly once, the values of a certain component 
    1.48    /// will be set continuously.
    1.49    /// \return The number of components.
    1.50 +  ///
    1.51    template <typename UndirGraph, typename UndirEdgeMap>
    1.52    int nodeBiconnectedComponents(const UndirGraph& graph, 
    1.53  				UndirEdgeMap& compMap) {
    1.54 @@ -1069,12 +1081,16 @@
    1.55    /// relation on the nodes. Two nodes are in relationship when they are  
    1.56    /// connected at least two edge-disjoint paths.
    1.57    ///
    1.58 +  /// \image html edge_biconnected_components.png
    1.59 +  /// \image latex edge_biconnected_components.eps "Edge biconnected components" width=\textwidth
    1.60 +  ///
    1.61    /// \param graph The graph.
    1.62    /// \retval comp A writable node map. The values will be set from 0 to
    1.63    /// the number of the biconnected components minus one. Each values 
    1.64    /// of the map will be set exactly once, the values of a certain component 
    1.65    /// will be set continuously.
    1.66    /// \return The number of components.
    1.67 +  ///
    1.68    template <typename UndirGraph, typename NodeMap>
    1.69    int edgeBiconnectedComponents(const UndirGraph& graph, NodeMap& compMap) { 
    1.70      checkConcept<concept::UndirGraph, UndirGraph>();
    1.71 @@ -1322,7 +1338,7 @@
    1.72  	  Node source = graph.source(edge);
    1.73  	  Node target = graph.target(edge);
    1.74  	  if (dfs.reached(target) && 
    1.75 -	      dfs.pred(source) != graph.oppositeEdge(edge)) {
    1.76 +	      dfs.predEdge(source) != graph.oppositeEdge(edge)) {
    1.77  	    return false;
    1.78  	  }
    1.79  	  dfs.processNextEdge();
    1.80 @@ -1353,7 +1369,7 @@
    1.81        Node source = graph.source(edge);
    1.82        Node target = graph.target(edge);
    1.83        if (dfs.reached(target) && 
    1.84 -	  dfs.pred(source) != graph.oppositeEdge(edge)) {
    1.85 +	  dfs.predEdge(source) != graph.oppositeEdge(edge)) {
    1.86  	return false;
    1.87        }
    1.88        dfs.processNextEdge();