pub fn is_weakly_connected(graph: &Graph) -> boolExpand description
Returns whether graph is weakly connected: connected when the direction of the edges is ignored.
Answers without the partition of components::wccs_of, and stops
as soon as all nodes are connected. The empty graph is weakly connected, and so is a single node.
For the directed reading, see is_strongly_connected.
Time: O(node_count + edge_count x alpha(node_count)), stopping once all nodes are connected. Memory: 5 x node_count bytes while it runs.