Test directed graph for strong connectivity.
A directed graph is strongly connected if and only if every vertex in the graph is reachable from every other vertex.
- GNetworkX Graph
A directed graph.
True if the graph is strongly connected, False otherwise.
If G is undirected.
For directed graphs only.
>>> G = nx.DiGraph([(0, 1), (1, 2), (2, 3), (3, 0), (2, 4), (4, 2)]) >>> nx.is_strongly_connected(G) True >>> G.remove_edge(2, 3) >>> nx.is_strongly_connected(G) False