Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.objectstyle.ashwood.graph
Class IndegreeTopologicalSort  view IndegreeTopologicalSort download IndegreeTopologicalSort.java

java.lang.Object
  extended byorg.objectstyle.ashwood.graph.Algorithm
      extended byorg.objectstyle.ashwood.graph.IndegreeTopologicalSort
All Implemented Interfaces:
java.util.Iterator

public class IndegreeTopologicalSort
extends Algorithm


Nested Class Summary
private static class IndegreeTopologicalSort.InDegree
           
 
Field Summary
private  java.util.ListIterator current
           
private  Digraph digraph
           
private  java.util.Map inDegrees
           
private  java.util.LinkedList vertices
           
 
Constructor Summary
IndegreeTopologicalSort(Digraph digraph)
           
 
Method Summary
 boolean hasNext()
          Tests whether there are elements remaining in the collection.
 java.lang.Object next()
          Obtain the next element in the collection.
private  void removeVertex(java.lang.Object vertex)
           
 
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
 

Field Detail

digraph

private Digraph digraph

vertices

private java.util.LinkedList vertices

inDegrees

private java.util.Map inDegrees

current

private java.util.ListIterator current
Constructor Detail

IndegreeTopologicalSort

public IndegreeTopologicalSort(Digraph digraph)
Method Detail

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)