Note

This is the documentation for the current state of the development branch of rustworkx. The documentation or APIs here can change prior to being released.

rustworkx.number_weakly_connected_components#

number_weakly_connected_components(graph, /)#

Find the number of weakly connected components in a directed graph

Parameters:

graph (PyDiGraph) – The graph to find the number of weakly connected components on

Returns:

The number of weakly connected components in the graph

Return type:

int