Returns the number of weakly connected components in G.
A directed graph.
Number of weakly connected components
If G is undirected.
See also
weakly_connected_components
number_connected_components
number_strongly_connected_components
Notes
For directed graphs only.