Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Determines the number of connected components in the network.
On directed graphs: detect strongly and weakly connected components.
On undirected graphs: detect only weakly connected components.
This code was implemented by Patrick McSweeney.
Robert Tarjan, Depth-First Search and Linear Graph Algorithms, in SIAM Journal on Computing 1 (2): 146–160 (1972)