| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.mhhe.clrs2e.Prim.PrimInfo
Inner class to maintain the Vertex object, key,
 parent, and handle into the priority queue for each vertex.
| Nested Class Summary | 
| Nested classes inherited from class com.mhhe.clrs2e.DynamicSetElement | 
| DynamicSetElement.Helper | 
| Field Summary | |
|  java.lang.Object | handleA handle to the vertex's information in the priority queue, or nullif the vertex is not in the
 priority queue. | 
|  java.lang.Double | keyVertex's key, representing the weight of the lightest edge between this vertex and some vertex known to be in the minimum spanning tree. | 
|  com.mhhe.clrs2e.Vertex | piThe current parent for this vertex. | 
|  com.mhhe.clrs2e.Vertex | theVertexThe vertex. | 
| Constructor Summary | |
| Prim.PrimInfo(com.mhhe.clrs2e.Vertex v,
              com.mhhe.clrs2e.MinPriorityQueue q)Sets the instance variables so that there is no known edge between this vertex and any vertex in the minimum spanning tree (i.e., the key is infinity), and inserts this object into the min-priority queue. | |
| Method Summary | |
|  int | compareTo(java.lang.Object e)Compares this object's key to that of another PrimInfoobject. | 
|  java.lang.Comparable | getKey()Returns the value of the key. | 
|  void | setKey(java.lang.Comparable key)Sets the key. | 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
public com.mhhe.clrs2e.Vertex theVertex
public java.lang.Double key
public com.mhhe.clrs2e.Vertex pi
public java.lang.Object handle
null if the vertex is not in the
 priority queue.
| Constructor Detail | 
public Prim.PrimInfo(com.mhhe.clrs2e.Vertex v,
                     com.mhhe.clrs2e.MinPriorityQueue q)
v - The vertex.q - The min-priority queue.| Method Detail | 
public void setKey(java.lang.Comparable key)
setKey in interface DynamicSetElementkey - The new key value.public java.lang.Comparable getKey()
getKey in interface DynamicSetElementpublic int compareTo(java.lang.Object e)
PrimInfo object.
compareTo in interface DynamicSetElemente - The other PrimInfo object.
| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||