|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.ksu.cis.kdd.util.graph.StronglyConnectedComponents
A class to compute the strongly connected components. A straight forward implementation from Cormen's textbook.
Field Summary | |
protected TableSet |
adjacencyListTable
|
protected java.util.Hashtable |
clusterTable
|
protected TableSet |
gTransform
|
protected java.util.LinkedList |
reversePostOrderList
|
protected java.util.HashSet |
seenAlready
|
Constructor Summary | |
StronglyConnectedComponents(Graph graph)
|
|
StronglyConnectedComponents(java.util.Set[] adjList)
|
|
StronglyConnectedComponents(TableSet adjList)
|
Method Summary | |
protected java.util.Set |
dfsGetStronglyConnectedGraph(java.lang.Object curNode,
java.util.HashSet set)
|
protected void |
dfsSortByPostScore(java.lang.Object curNode)
Deep first search computing post order score and the graph transform |
java.util.Hashtable |
getClusterTable()
Get the table of node -> scc cluster |
java.util.Set |
getComponents()
Returns the set of sets of strongly connected components |
static java.util.Set |
getComponents(Graph graph)
|
static java.util.Set |
getComponents(TableSet adjList)
|
static void |
main(java.lang.String[] args)
A driver to test this strongly connected components |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected TableSet adjacencyListTable
protected java.util.LinkedList reversePostOrderList
protected java.util.HashSet seenAlready
protected TableSet gTransform
protected java.util.Hashtable clusterTable
Constructor Detail |
public StronglyConnectedComponents(TableSet adjList)
public StronglyConnectedComponents(java.util.Set[] adjList)
public StronglyConnectedComponents(Graph graph)
Method Detail |
public java.util.Set getComponents()
protected void dfsSortByPostScore(java.lang.Object curNode)
curNode
- protected java.util.Set dfsGetStronglyConnectedGraph(java.lang.Object curNode, java.util.HashSet set)
public static java.util.Set getComponents(TableSet adjList)
public static java.util.Set getComponents(Graph graph)
public java.util.Hashtable getClusterTable()
public static void main(java.lang.String[] args)
args
-
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |