com.mhhe.clrs2e
Class SCC.FirstDFS

java.lang.Object
  |
  +--com.mhhe.clrs2e.DFS
        |
        +--com.mhhe.clrs2e.SCC.FirstDFS
Enclosing class:
SCC

private class SCC.FirstDFS
extends DFS

Inner class to do the first DFS. It inserts finished vertices onto the front of the linked list, so that the most recently finished vertices are toward the head of the list.


Field Summary
 
Fields inherited from class com.mhhe.clrs2e.DFS
dfsInfo, time
 
Constructor Summary
private SCC.FirstDFS()
           
 
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

SCC.FirstDFS

private SCC.FirstDFS()
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 directed graph.
u - The vertex just finished.