java.lang.Object
org.objectstyle.ashwood.graph.Algorithm
org.objectstyle.ashwood.graph.IndegreeTopologicalSort
- All Implemented Interfaces:
- java.util.Iterator
- public class IndegreeTopologicalSort
- extends Algorithm
| Methods inherited from class org.objectstyle.ashwood.graph.Algorithm |
remove |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
digraph
private Digraph digraph
vertices
private java.util.LinkedList vertices
inDegrees
private java.util.Map inDegrees
current
private java.util.ListIterator current
IndegreeTopologicalSort
public IndegreeTopologicalSort(Digraph digraph)
hasNext
public boolean hasNext()
- Description copied from interface:
java.util.Iterator
- Tests whether there are elements remaining in the collection. In other
words, calling
next() will not throw an exception.
- Specified by:
hasNext in interface java.util.Iterator- Specified by:
hasNext in class Algorithm
next
public java.lang.Object next()
- Description copied from interface:
java.util.Iterator
- Obtain the next element in the collection.
- Specified by:
next in interface java.util.Iterator- Specified by:
next in class Algorithm
removeVertex
private void removeVertex(java.lang.Object vertex)