rustworkx.connected_components#

connected_components(graph, /)#

Find the connected components in an undirected graph

Parameters:

graph (PyGraph) – The graph to find the connected components.

Returns:

A list of sets where each set is a connected component of the graph

Return type:

list