rustworkx.is_connected#

is_connected(graph, /)#

Check if the graph is connected.

Parameters:

graph (PyGraph) – The graph to check if it is connected.

Returns:

Whether the graph is connected or not

Return type:

bool

Raises:

NullGraph – If an empty graph is passed in