|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.umd.cs.findbugs.graph.StronglyConnectedComponents<GraphType,EdgeType,VertexType>
public class StronglyConnectedComponents<GraphType extends Graph<EdgeType,VertexType>,EdgeType extends GraphEdge<EdgeType,VertexType>,VertexType extends GraphVertex<VertexType>>
Algorithm to find strongly connected components in a graph. Based on algorithm in Cormen et. al., Introduction to Algorithms, p. 489.
Nested Class Summary | |
---|---|
private class |
StronglyConnectedComponents.SCCSetIterator
Iterator for iterating over sets of vertices in strongly connected components. |
Field Summary | |
---|---|
private java.util.ArrayList<SearchTree<VertexType>> |
m_stronglyConnectedSearchTreeList
|
private VertexChooser<VertexType> |
m_vertexChooser
|
Constructor Summary | |
---|---|
StronglyConnectedComponents()
Constructor. |
Method Summary | |
---|---|
private SearchTree<VertexType> |
copySearchTree(SearchTree<VertexType> tree,
Transpose<GraphType,EdgeType,VertexType> t)
Make a copy of given search tree (in the transposed graph) using vertices of the original graph. |
void |
findStronglyConnectedComponents(GraphType g,
GraphToolkit<GraphType,EdgeType,VertexType> toolkit)
Find the strongly connected components in given graph. |
java.util.Iterator<SearchTree<VertexType>> |
searchTreeIterator()
Returns an iterator over the search trees containing the vertices of each strongly connected component. |
java.util.Iterator<java.util.Set<VertexType>> |
setIterator()
Returns an iterator over the sets of vertices of each strongly connected component. |
void |
setVertexChooser(VertexChooser<VertexType> vertexChooser)
Specify a VertexChooser object to restrict which vertices are considered. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.util.ArrayList<SearchTree<VertexType extends GraphVertex<VertexType>>> m_stronglyConnectedSearchTreeList
private VertexChooser<VertexType extends GraphVertex<VertexType>> m_vertexChooser
Constructor Detail |
---|
public StronglyConnectedComponents()
Method Detail |
---|
public void setVertexChooser(VertexChooser<VertexType> vertexChooser)
public void findStronglyConnectedComponents(GraphType g, GraphToolkit<GraphType,EdgeType,VertexType> toolkit)
g
- the graphtoolkit
- a GraphToolkit, used to create temporary graphs
used by the algorithmprivate SearchTree<VertexType> copySearchTree(SearchTree<VertexType> tree, Transpose<GraphType,EdgeType,VertexType> t)
tree
- a search tree in the transposed grapht
- the Transpose object which performed the transposition of
the original graphpublic java.util.Iterator<SearchTree<VertexType>> searchTreeIterator()
public java.util.Iterator<java.util.Set<VertexType>> setIterator()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |