Package org.carrot2.util
Class GraphUtils
java.lang.Object
org.carrot2.util.GraphUtils
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
A predicate defining arcs of an undirected graph. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic 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
-