Package com.ibm.wala.util.graph.traverse
Class SCCIterator<T>
- java.lang.Object
-
- com.ibm.wala.util.graph.traverse.SCCIterator<T>
-
public class SCCIterator<T> extends Object implements Iterator<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, 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.Set<T>
next()
Find the next SCC in this enumerationvoid
remove()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
-
-
-
Constructor Detail
-
SCCIterator
public SCCIterator(Graph<T> G) throws NullPointerException
Construct an enumeration across the SCCs of a given graph.- Parameters:
G
- The graph over which to construct SCCs- Throws:
NullPointerException
- if G is null
-
-
Method Detail
-
hasNext
public boolean hasNext()
Determine whether there are any more SCCs remaining in this enumeration.
-
next
public Set<T> next() throws NoSuchElementException
Find the next SCC in this enumeration- Specified by:
next
in interfaceIterator<T>
- Throws:
NoSuchElementException
-
remove
public void remove() throws UnsupportedOperationException
- Specified by:
remove
in interfaceIterator<T>
- Throws:
UnsupportedOperationException
-
-