Package org.jgrapht.util
Class FibonacciHeapNode<T>
- java.lang.Object
-
- org.jgrapht.util.FibonacciHeapNode<T>
-
- Type Parameters:
T- node data type
public class FibonacciHeapNode<T> extends java.lang.ObjectImplements 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).
-
-
Field Summary
Fields Modifier and Type Field Description (package private) FibonacciHeapNode<T>childfirst child node(package private) TdataNode data.(package private) intdegreenumber of children of this node (does not count grandchildren)(package private) doublekeykey value for this node(package private) FibonacciHeapNode<T>leftleft sibling node(package private) booleanmarktrue if this node has had a child removed since this node was added to its parent(package private) FibonacciHeapNode<T>parentparent node(package private) FibonacciHeapNode<T>rightright sibling node
-
Constructor Summary
Constructors Constructor Description FibonacciHeapNode(T data)Constructs a new node.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TgetData()Obtain the data for this node.doublegetKey()Obtain the key for this node.java.lang.StringtoString()Return the string representation of this object.
-
-
-
Field Detail
-
data
T data
Node data.
-
child
FibonacciHeapNode<T> child
first child node
-
left
FibonacciHeapNode<T> left
left sibling node
-
parent
FibonacciHeapNode<T> parent
parent node
-
right
FibonacciHeapNode<T> right
right sibling node
-
mark
boolean mark
true if this node has had a child removed since this node was added to its parent
-
key
double key
key value for this node
-
degree
int degree
number of children of this node (does not count grandchildren)
-
-
Constructor Detail
-
FibonacciHeapNode
public FibonacciHeapNode(T data)
Constructs a new node.- Parameters:
data- data for this node
-
-
Method Detail
-
getKey
public final double getKey()
Obtain the key for this node.- Returns:
- the key
-
getData
public final T getData()
Obtain the data for this node.- Returns:
- the data
-
toString
public java.lang.String toString()
Return the string representation of this object.- Overrides:
toStringin classjava.lang.Object- Returns:
- string representing this object
-
-