T - Type of the nodes on the graphpublic class StronglyConnectedComponents<T>
extends java.lang.Object
| Modifier and Type | Class and Description | 
|---|---|
| static interface  | StronglyConnectedComponents.Graph<T>Provides the strongly connected components algorithm with the information
 it requires about the directed graph. | 
| Constructor and Description | 
|---|
| StronglyConnectedComponents() | 
| Modifier and Type | Method and Description | 
|---|---|
| void | calculateConnectedComponents(StronglyConnectedComponents.Graph<T> inputGraph,
                            int minSize,
                            boolean isoIfSelfref)Calculates the strongly connected components for a graph. | 
| java.util.Collection<T> | getConnectedComponent(int index)Gets the node set for a strongly connected component. | 
| int | getConnectedComponentCount()Gets the number of strongly connected components found. | 
| int | getIndexFor(T node)Gets the index of the strongly connected component of a node. | 
public int getConnectedComponentCount()
public java.util.Collection<T> getConnectedComponent(int index)
index - Index of the strongly connected component.public int getIndexFor(T node)
node - The node of interest.public void calculateConnectedComponents(StronglyConnectedComponents.Graph<T> inputGraph, int minSize, boolean isoIfSelfref) throws SDMetricsException
inputGraph - The graph to operate on.minSize - The minimum size a strongly connected component must have
        to be reported by the algorithm.isoIfSelfref - When this is set to true, isolated nodes
        ("connected components of size one") are reported only if the node
        has an edge to itself. When set to false, such
        connected components are always reported. If minSize is greater
        than one, this parameter is ignored.SDMetricsException - The set of neighbors of a node could not be
         calculated.