soot.toolkits.graph
Class StronglyConnectedComponents

java.lang.Object
  |
  +--soot.toolkits.graph.StronglyConnectedComponents

public class StronglyConnectedComponents
extends java.lang.Object

Identifies and provides an interface to query the strongly-connected components of DirectedGraph instances.

See Also:
DirectedGraph

Constructor Summary
StronglyConnectedComponents(DirectedGraph g)
           
 
Method Summary
 boolean equivalent(java.lang.Object a, java.lang.Object b)
          Checks if 2 nodes are in the same strongly-connnected component.
 java.util.List getComponentOf(java.lang.Object a)
           
 java.util.List getComponents()
           
 DirectedGraph getSuperGraph()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StronglyConnectedComponents

public StronglyConnectedComponents(DirectedGraph g)
Parameters:
g - a graph for which we want to compute the strongly connected components.
See Also:
DirectedGraph
Method Detail

equivalent

public boolean equivalent(java.lang.Object a,
                          java.lang.Object b)
Checks if 2 nodes are in the same strongly-connnected component.

Parameters:
a - some graph node.
b - some graph node
Returns:
true if both nodes are in the same strongly-connnected component. false otherwise.

getComponents

public java.util.List getComponents()
Returns:
a list of the strongly-connnected components that make up the computed strongly-connnect component graph.

getComponentOf

public java.util.List getComponentOf(java.lang.Object a)
Parameters:
a - a node of the original graph.
Returns:
the strongly-connnected component node to which the parameter node belongs.

getSuperGraph

public DirectedGraph getSuperGraph()
Returns:
the computed strongly-connnected component graph.
See Also:
DirectedGraph