290 /// \ingroup topology |
290 /// \ingroup topology |
291 /// |
291 /// |
292 /// \brief Count the strongly connected components of a directed graph |
292 /// \brief Count the strongly connected components of a directed graph |
293 /// |
293 /// |
294 /// Count the strongly connected components of a directed graph. |
294 /// Count the strongly connected components of a directed graph. |
295 /// The strongly connected components are the classes of an equivalence |
295 /// The strongly connected components are the classes of an |
296 /// relation on the nodes of the graph. Two nodes are connected with |
296 /// equivalence relation on the nodes of the graph. Two nodes are in |
297 /// directed paths in both direction. |
297 /// the same class if they are connected with directed paths in both |
|
298 /// direction. |
298 /// |
299 /// |
299 /// \param graph The graph. |
300 /// \param graph The graph. |
300 /// \return The number of components |
301 /// \return The number of components |
301 /// \note By definition, the empty graph has zero |
302 /// \note By definition, the empty graph has zero |
302 /// strongly connected components. |
303 /// strongly connected components. |
352 |
353 |
353 /// \ingroup topology |
354 /// \ingroup topology |
354 /// |
355 /// |
355 /// \brief Find the strongly connected components of a directed graph |
356 /// \brief Find the strongly connected components of a directed graph |
356 /// |
357 /// |
357 /// Find the strongly connected components of a directed graph. |
358 /// Find the strongly connected components of a directed graph. The |
358 /// The strongly connected components are the classes of an equivalence |
359 /// strongly connected components are the classes of an equivalence |
359 /// relation on the nodes of the graph. Two nodes are in relationship |
360 /// relation on the nodes of the graph. Two nodes are in |
360 /// when there are directed paths between them in both direction. |
361 /// relationship when there are directed paths between them in both |
|
362 /// direction. In addition, the numbering of components will satisfy |
|
363 /// that there is no edge going from a higher numbered component to |
|
364 /// a lower. |
361 /// |
365 /// |
362 /// \image html strongly_connected_components.png |
366 /// \image html strongly_connected_components.png |
363 /// \image latex strongly_connected_components.eps "Strongly connected components" width=\textwidth |
367 /// \image latex strongly_connected_components.eps "Strongly connected components" width=\textwidth |
364 /// |
368 /// |
365 /// \param graph The graph. |
369 /// \param graph The graph. |
366 /// \retval compMap A writable node map. The values will be set from 0 to |
370 /// \retval compMap A writable node map. The values will be set from 0 to |
367 /// the number of the strongly connected components minus one. Each values |
371 /// the number of the strongly connected components minus one. Each value |
368 /// of the map will be set exactly once, the values of a certain component |
372 /// of the map will be set exactly once, the values of a certain component |
369 /// will be set continuously. |
373 /// will be set continuously. |
370 /// \return The number of components |
374 /// \return The number of components |
371 /// |
375 /// |
372 template <typename Graph, typename NodeMap> |
376 template <typename Graph, typename NodeMap> |