Package com.jgalgo

Interface ConnectedComponentsAlgo


  • public interface ConnectedComponentsAlgo
    Connectivity components algorithm.
    Author:
    Barak Ugav
    • Method Detail

      • computeConnectivityComponents

        ConnectedComponentsAlgo.Result computeConnectivityComponents​(Graph g)
        Find all (strongly) connected components in a graph.

        A (strongly) connected component is a maximal set of vertices for which for any pair of vertices \(u, v\) in the set there exist a path from \(u\) to \(v\) and from \(v\) to \(u\).

        Parameters:
        g - a graph
        Returns:
        a result object containing the partition of the vertices into (strongly) connected components