NetworkX

Previous topic

networkx.algorithms.components.strongly_connected.kosaraju_strongly_connected_components

Next topic

networkx.algorithms.components.weakly_connected.is_weakly_connected

networkx.algorithms.components.strongly_connected.condensation

networkx.algorithms.components.strongly_connected.condensation(G)

Returns the condensation of G.

The condensation of G is the graph with each of the strongly connected components contracted into a single node.

Parameters :

G : NetworkX Graph

A directed graph.

Returns :

cG : NetworkX DiGraph

The condensation of G.

Notes

After contracting all strongly connected components to a single node, the resulting graph is a directed acyclic graph.