Package com.mxgraph.analysis
Class mxFibonacciHeap.Node
java.lang.Object
com.mxgraph.analysis.mxFibonacciHeap.Node
- Enclosing class:
- mxFibonacciHeap
Implements a node of the Fibonacci heap. It holds the information
necessary for maintaining the structure of the heap. It also holds the
reference to the key value (which is used to determine the heap
structure). Additional Node data should be stored in a subclass.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) mxFibonacciHeap.Node
first child node(package private) int
number of children of this node (does not count grandchildren)(package private) double
key value for this node(package private) mxFibonacciHeap.Node
left sibling node(package private) boolean
true if this node has had a child removed since this node was added to its parent(package private) mxFibonacciHeap.Node
parent node(package private) mxFibonacciHeap.Node
right sibling node(package private) Object
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal double
getKey()
Obtain the key for this node.void
setUserObject
(Object userObject)
-
Field Details
-
userObject
Object userObject -
child
mxFibonacciHeap.Node childfirst child node -
left
mxFibonacciHeap.Node leftleft sibling node -
parent
mxFibonacciHeap.Node parentparent node -
right
mxFibonacciHeap.Node rightright sibling node -
mark
boolean marktrue if this node has had a child removed since this node was added to its parent -
key
double keykey value for this node -
degree
int degreenumber of children of this node (does not count grandchildren)
-
-
Constructor Details
-
Node
Default constructor. Initializes the right and left pointers, making this a circular doubly-linked list.- Parameters:
key
- The initial key for node.
-
-
Method Details
-
getKey
public final double getKey()Obtain the key for this node.- Returns:
- the key
-
getUserObject
- Returns:
- Returns the userObject.
-
setUserObject
- Parameters:
userObject
- The userObject to set.
-