soot.toolkits.graph
Class StronglyConnectedComponentsFast<N>
java.lang.Object
soot.toolkits.graph.StronglyConnectedComponentsFast<N>
public class StronglyConnectedComponentsFast<N>
- extends Object
Identifies and provides an interface to query the strongly-connected
components of DirectedGraph instances.
Uses Tarjan's algorithm.
- Author:
- Eric Bodden
- See Also:
DirectedGraph
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
componentList
protected final List<List<N>> componentList
trueComponentList
protected final List<List<N>> trueComponentList
index
protected int index
indexForNode
protected Map<N,Integer> indexForNode
lowlinkForNode
protected Map<N,Integer> lowlinkForNode
s
protected Stack<N> s
g
protected DirectedGraph<N> g
StronglyConnectedComponentsFast
public StronglyConnectedComponentsFast(DirectedGraph<N> g)
- Parameters:
g
- a graph for which we want to compute the strongly
connected components.- See Also:
DirectedGraph
recurse
protected void recurse(N v)
getComponents
public List<List<N>> getComponents()
- Returns:
- the list of the strongly-connected components
getTrueComponents
public List<List<N>> getTrueComponents()
- Returns:
- the list of the strongly-connected components, but only those
that are true components, i.e. components which have more than one element
or consists of one node that has itself as a successor