Class GraphUtils


  • public class GraphUtils
    extends Object
    Various utilities for processing graphs.
    • Constructor Detail

      • GraphUtils

        public GraphUtils()
    • Method Detail

      • findCoherentSubgraphs

        public static List<com.carrotsearch.hppc.IntArrayList> findCoherentSubgraphs​(int vertexCount,
                                                                                     GraphUtils.IArcPredicate arcPredicate,
                                                                                     boolean pruneOneNodeSubrgaphs)
        Finds coherent subgraphs of an undirected graph.
        Parameters:
        vertexCount - the number of vertices in the graph
        arcPredicate - a predicate that determines which vertices are connected by an arc
        pruneOneNodeSubrgaphs - if true, one-node subgraphs will not be included in the result
        Returns:
        a list of IntArrayLists containing vertices of the coherent subgraphs