com.mhhe.clrs2e
Class TopoSort.TopoSortDFS

java.lang.Object
  |
  +--com.mhhe.clrs2e.DFS
        |
        +--com.mhhe.clrs2e.TopoSort.TopoSortDFS
Enclosing class:
TopoSort

private class TopoSort.TopoSortDFS
extends DFS

Inner class to do DFS but with inserting finished vertices onto the front of the linked list.


Field Summary
 
Fields inherited from class com.mhhe.clrs2e.DFS
dfsInfo, time
 
Constructor Summary
private TopoSort.TopoSortDFS()
           
 
Method Summary
protected  void finish(com.mhhe.clrs2e.AdjacencyListGraph g, com.mhhe.clrs2e.Vertex u)
          Overrides the DFS.finish(com.mhhe.clrs2e.AdjacencyListGraph, com.mhhe.clrs2e.Vertex) method to insert the finished vertex onto the front of the linked list.
 
Methods inherited from class com.mhhe.clrs2e.DFS
dfsVisit, discover, getDFSInfo, getDFSInfo, search
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TopoSort.TopoSortDFS

private TopoSort.TopoSortDFS()
Method Detail

finish

protected void finish(com.mhhe.clrs2e.AdjacencyListGraph g,
                      com.mhhe.clrs2e.Vertex u)
Overrides the DFS.finish(com.mhhe.clrs2e.AdjacencyListGraph, com.mhhe.clrs2e.Vertex) method to insert the finished vertex onto the front of the linked list.

Overrides:
finish in class DFS
Parameters:
g - The graph.
u - The vertex just finished.