|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.mhhe.clrs2e.FibHeap.Node
Inner class for a node within a Fibonaaci heap.
Field Summary | |
FibHeap.Node |
child
Some child of this node. |
int |
degree
How many children this node has. |
FibHeap.Node |
left
This node's left sibling. |
boolean |
mark
true if this node is marked,
false if not marked. |
com.mhhe.clrs2e.DynamicSetElement |
object
The object stored in this node. |
FibHeap.Node |
p
This node's parent, or null if this node is a
root. |
FibHeap.Node |
right
This node's right sibling. |
Constructor Summary | |
FibHeap.Node(com.mhhe.clrs2e.DynamicSetElement e)
Creates a new node. |
Method Summary | |
java.lang.String |
toString()
Returns the String representation of this
node's object, along with its degree and mark. |
java.lang.String |
walk(int depth)
Returns the String representation of the
subtree rooted at this node, based on the objects in the
nodes. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public com.mhhe.clrs2e.DynamicSetElement object
public FibHeap.Node p
null
if this node is a
root.
public FibHeap.Node child
public FibHeap.Node right
public FibHeap.Node left
public int degree
public boolean mark
true
if this node is marked,
false
if not marked.
Constructor Detail |
public FibHeap.Node(com.mhhe.clrs2e.DynamicSetElement e)
e
- The dynamic set element to store in the node.Method Detail |
public java.lang.String toString()
String
representation of this
node's object, along with its degree and mark.
toString
in class java.lang.Object
public java.lang.String walk(int depth)
String
representation of the
subtree rooted at this node, based on the objects in the
nodes. It represents the depth of each node by two spaces
per depth preceding the String
representation
of the node.
depth
- Depth of this node.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |