Warning
This documents an unmaintained version of NetworkX. Please upgrade to a maintained version and see the current NetworkX documentation.
strongly_connected_components_recursive¶

strongly_connected_components_recursive
(G)[source]¶ Generate nodes in strongly connected components of graph.
Recursive version of algorithm.
Parameters: G : NetworkX Graph
An directed graph.
Returns: comp : generator of lists
A list of nodes for each component of G. The list is ordered from largest connected component to smallest.
Raises: NetworkXNotImplemented : If G is undirected
See also
connected_components
Notes
Uses Tarjan’s algorithm with Nuutila’s modifications.
References
[R213] Depthfirst search and linear graph algorithms, R. Tarjan SIAM Journal of Computing 1(2):146160, (1972). [R214] On finding the strongly connected components in a directed graph. E. Nuutila and E. SoisalonSoinen Information Processing Letters 49(1): 914, (1994)..