org.carrot2.util
Class GraphUtils

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

public class GraphUtils
extends Object

Various utilities for processing graphs.


Nested Class Summary
static interface GraphUtils.IArcPredicate
          A predicate defining arcs of an undirected graph.
 
Constructor Summary
GraphUtils()
           
 
Method Summary
static List<com.carrotsearch.hppc.IntArrayList> findCoherentSubgraphs(int vertexCount, GraphUtils.IArcPredicate arcPredicate, boolean pruneOneNodeSubrgaphs)
          Finds coherent subgraphs of an undirected graph.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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


Copyright (c) Dawid Weiss, Stanislaw Osinski