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.strongly_connected_components#

strongly_connected_components(graph, /)#

Compute the strongly connected components for a directed graph

This function is implemented using Kosaraju’s algorithm

Parameters:

graph (PyDiGraph) – The input graph to find the strongly connected components for.

Returns:

A list of list of node ids for strongly connected components

Return type:

list