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.Object
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).
-
-
Field Summary
Fields Modifier and Type Field Description (package private) FibonacciHeapNode<T>
child
first child node(package private) T
data
Node data.(package private) int
degree
number of children of this node (does not count grandchildren)(package private) double
key
key value for this node(package private) FibonacciHeapNode<T>
left
left sibling node(package private) boolean
mark
true if this node has had a child removed since this node was added to its parent(package private) FibonacciHeapNode<T>
parent
parent node(package private) FibonacciHeapNode<T>
right
right 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 T
getData()
Obtain the data for this node.double
getKey()
Obtain the key for this node.java.lang.String
toString()
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:
toString
in classjava.lang.Object
- Returns:
- string representing this object
-
-