Package com.ibm.wala.util.graph.traverse
Class SCCIterator<T>
- java.lang.Object
-
- com.ibm.wala.util.graph.traverse.SCCIterator<T>
-
- All Implemented Interfaces:
java.util.Iterator<java.util.Set<T>>
public class SCCIterator<T> extends java.lang.Object implements java.util.Iterator<java.util.Set<T>>
This class computes strongly connected components for a Graph (or a subset of it). It does not store the SCCs in any lookaside structure, but rather simply generates an enumeration of them. See Cormen, Leiserson, Rivest Ch. 23 Sec. 5
-
-
Constructor Summary
Constructors Constructor Description SCCIterator(Graph<T> G)
Construct an enumeration across the SCCs of a given graph.SCCIterator(Graph<T> G, java.util.Iterator<T> nodes)
Construct an enumeration of the SCCs of the subset of a given graph determined by starting at a given set of nodes.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
hasNext()
Determine whether there are any more SCCs remaining in this enumeration.java.util.Set<T>
next()
Find the next SCC in this enumerationvoid
remove()
-
-
-
Method Detail
-
hasNext
public boolean hasNext()
Determine whether there are any more SCCs remaining in this enumeration.- Specified by:
hasNext
in interfacejava.util.Iterator<T>
-
next
public java.util.Set<T> next() throws java.util.NoSuchElementException
Find the next SCC in this enumeration- Specified by:
next
in interfacejava.util.Iterator<T>
- Throws:
java.util.NoSuchElementException
-
remove
public void remove() throws java.lang.UnsupportedOperationException
- Specified by:
remove
in interfacejava.util.Iterator<T>
- Throws:
java.lang.UnsupportedOperationException
-
-