Class GraphUtils

java.lang.Object
org.carrot2.util.GraphUtils

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

  • Method Details

    • 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