Changeset 1807:5f2f3d982eba in lemon0.x
 Timestamp:
 11/16/05 14:26:04 (18 years ago)
 Branch:
 default
 Phase:
 public
 Convert:
 svn:c9d7d8f590d60310b91f818b3a526b0e/lemon/trunk@2350
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

lemon/topology.h
r1800 r1807 49 49 /// \param graph The undirected graph. 50 50 /// \return %True when there is path between any two nodes in the graph. 51 /// \ warning The empty graph is notconnected.51 /// \note By definition, the empty graph is connected. 52 52 template <typename UndirGraph> 53 53 bool connected(const UndirGraph& graph) { 54 54 checkConcept<concept::UndirGraph, UndirGraph>(); 55 55 typedef typename UndirGraph::NodeIt NodeIt; 56 if (NodeIt(graph) == INVALID) return false;56 if (NodeIt(graph) == INVALID) return true; 57 57 Dfs<UndirGraph> dfs(graph); 58 58 dfs.run(NodeIt(graph)); … … 73 73 /// \param graph The graph. It should be undirected. 74 74 /// \return The number of components 75 /// \note By definition, the empty graph consists 76 /// of zero connected components. 75 77 template <typename UndirGraph> 76 78 int countConnectedComponents(const UndirGraph &graph) { … … 238 240 /// \see connected 239 241 /// 240 /// \ warning Empty graph is notstrongly connected.242 /// \note By definition, the empty graph is strongly connected. 241 243 template <typename Graph> 242 244 bool stronglyConnected(const Graph& graph) { 243 245 checkConcept<concept::StaticGraph, Graph>(); 244 if (NodeIt(graph) == INVALID) return false;246 if (NodeIt(graph) == INVALID) return true; 245 247 246 248 typedef typename Graph::Node Node; … … 294 296 /// \param graph The graph. 295 297 /// \return The number of components 298 /// \note By definition, the empty graph has zero 299 /// strongly connected components. 296 300 template <typename Graph> 297 301 int countStronglyConnectedComponents(const Graph& graph) { … … 357 361 /// 358 362 /// \param graph The graph. 359 /// \param compMap A writable node map. The values will be set from 0 to360 /// the number of the connected components minus one. Each values of the map361 /// will be set exactly once, the values of a certain component will be362 /// set continuously.363 363 /// \retval compMap A writable node map. The values will be set from 0 to 364 364 /// the number of the strongly connected components minus one. Each values
Note: See TracChangeset
for help on using the changeset viewer.