|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.mhhe.clrs2e.ShortestPathInfo | +--com.mhhe.clrs2e.Dijkstra.DijkstraInfo
Inner class to maintain the Vertex
object, key,
parent, and handle into the priority queue for each vertex.
The key (shortest-path estimate) and parent are inherited from
the superclass ShortestPathInfo
.
Nested Class Summary |
Nested classes inherited from class com.mhhe.clrs2e.DynamicSetElement |
DynamicSetElement.Helper |
Field Summary | |
java.lang.Object |
handle
A handle to the vertex's information in the priority queue, or null if the vertex is not in the
priority queue. |
com.mhhe.clrs2e.Vertex |
theVertex
The vertex. |
Fields inherited from class com.mhhe.clrs2e.ShortestPathInfo |
|
Constructor Summary | |
Dijkstra.DijkstraInfo()
Creates a DijkstraInfo object. |
Method Summary | |
int |
compareTo(java.lang.Object e)
Compares the key of this object's vertex to that of another. |
java.lang.Comparable |
getKey()
Returns the value of the key. |
void |
setKey(java.lang.Comparable key)
Sets the key. |
Methods inherited from class com.mhhe.clrs2e.ShortestPathInfo |
getEstimate, getPredecessor, relax, setEstimate, setPredecessor, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public com.mhhe.clrs2e.Vertex theVertex
public java.lang.Object handle
null
if the vertex is not in the
priority queue.
Constructor Detail |
public Dijkstra.DijkstraInfo()
DijkstraInfo
object. The instance
variables theVertex
and handle
fields will have to be set by the caller.
Method Detail |
public void setKey(java.lang.Comparable key)
setKey
in interface DynamicSetElement
key
- The new key value.public java.lang.Comparable getKey()
getKey
in interface DynamicSetElement
public int compareTo(java.lang.Object e)
compareTo
in interface DynamicSetElement
e
- The other DijkstraInfo
object.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |