NetworkX

Previous topic

networkx.is_connected

Next topic

networkx.connected_components

networkx.number_connected_components

number_connected_components(G)
Return the number of connected components in G. For undirected graphs only.