Package org.carrot2.util
Class GraphUtils
java.lang.Object
org.carrot2.util.GraphUtils
public class GraphUtils extends Object
Various utilities for processing graphs.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
GraphUtils.IArcPredicate
A predicate defining arcs of an undirected graph. -
Constructor Summary
Constructors Constructor Description GraphUtils()
-
Method Summary
Modifier and Type Method Description static List<com.carrotsearch.hppc.IntArrayList>
findCoherentSubgraphs(int vertexCount, GraphUtils.IArcPredicate arcPredicate, boolean pruneOneNodeSubrgaphs)
Finds coherent subgraphs of an undirected graph.
-
Constructor Details
-
GraphUtils
public GraphUtils()
-
-
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 grapharcPredicate
- a predicate that determines which vertices are connected by an arcpruneOneNodeSubrgaphs
- iftrue
, one-node subgraphs will not be included in the result- Returns:
- a list of
IntArrayList
s containing vertices of the coherent subgraphs
-