|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.mhhe.clrs2e.DFSInfo
Class for information determined about a vertex by depth-first search.
Field Summary | |
private java.awt.Color |
color
This vertex's color. |
private int |
d
This vertex's discovery time. |
private int |
f
This vertex's finish time. |
private com.mhhe.clrs2e.Vertex |
pi
This vertex's parent in the predecessor graph. |
Constructor Summary | |
DFSInfo()
Initializes the discovery and finish times to -1, the color to white, and the parent to null . |
Method Summary | |
java.awt.Color |
getColor()
Returns the vertex's color. |
int |
getDiscoveryTime()
Returns the vertex's discovery time. |
int |
getFinishTime()
Returns the vertex's finish time. |
com.mhhe.clrs2e.Vertex |
getPredecessor()
Returns the vertex's parent in the predecessor graph. |
void |
setColor(java.awt.Color c)
Sets the vertex's color |
void |
setDiscoveryTime(int time)
Sets the vertex's discovery time. |
void |
setFinishTime(int time)
Sets the vertex's finish time. |
void |
setPredecessor(com.mhhe.clrs2e.Vertex v)
Sets the vertex's parent in the predecessor graph. |
java.lang.String |
toString()
Returns the String representation of this object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private int d
private int f
private java.awt.Color color
private com.mhhe.clrs2e.Vertex pi
Constructor Detail |
public DFSInfo()
null
.
Method Detail |
public void setDiscoveryTime(int time)
time
- The discovery time.public int getDiscoveryTime()
public void setFinishTime(int time)
time
- The finish time.public int getFinishTime()
public void setColor(java.awt.Color c)
c
- The color.public java.awt.Color getColor()
public void setPredecessor(com.mhhe.clrs2e.Vertex v)
v
- The parent.public com.mhhe.clrs2e.Vertex getPredecessor()
public java.lang.String toString()
String
representation of this object.
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |