Class 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • data

        T data
        Node data.
      • 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 class java.lang.Object
        Returns:
        string representing this object