#

Note

This documents the development version of NetworkX. Documentation for the current release can be found here.

#

networkx.algorithms.components.number_strongly_connected_components

number_strongly_connected_components(G)[source]

Returns number of strongly connected components in graph.

Parameters

G (NetworkX graph) – A directed graph.

Returns

n – Number of strongly connected components

Return type

integer

Raises

NetworkXNotImplemented – If G is undirected.

Notes

For directed graphs only.