|
SandMark version 2.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--sandmark.util.graph.Dfs
Performs a depth-first-search on a sandmark.util.graph.Graph, classifying edges as TREE, BACK, CROSS, or FORWARD.
Field Summary | |
(package private) static int |
BLACK
|
(package private) PriorityQueue |
finish
|
(package private) Graph |
g
|
(package private) static int |
GRAY
|
(package private) PriorityQueue |
start
|
(package private) int |
time
|
(package private) static int |
WHITE
|
Constructor Summary | |
Dfs(Graph g)
|
|
Dfs(Graph g,
Node root)
Prepare to perform a depth-first-search on a graph. |
|
Dfs(Graph g,
PriorityQueue start,
PriorityQueue finish)
|
Method Summary | |
java.lang.Object |
clone()
|
Dfs |
copy()
Return a copy of the Dfs object. |
static void |
main(java.lang.String[] args)
|
void |
pass1()
Perform the depth-first-search. |
void |
pass2()
|
void |
process()
|
void |
process(Node root)
|
java.util.Iterator |
reverseTopOrder()
Generate one node from the graph at a time, in a reverse topological order. |
java.util.Iterator |
topOrder()
Generate one node from the graph at a time, in a topological order. |
java.lang.String |
toString()
Print out the nodesof the graph in a topological order. |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
static final int WHITE
static final int GRAY
static final int BLACK
PriorityQueue start
PriorityQueue finish
int time
Graph g
Constructor Detail |
public Dfs(Graph g, Node root)
public Dfs(Graph g)
public Dfs(Graph g, PriorityQueue start, PriorityQueue finish)
Method Detail |
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
public Dfs copy()
public void pass1()
public void pass2()
public void process()
public void process(Node root)
public java.util.Iterator topOrder()
public java.util.Iterator reverseTopOrder()
public java.lang.String toString()
toString
in class java.lang.Object
public static void main(java.lang.String[] args)
|
SandMark version 2.0 Mon Jun 17 12:30:47 MST 2002 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |