gishur.core
Class FibonacciNode

java.lang.Object
  |
  +--gishur.core.BasicListItem
        |
        +--gishur.core.StdListItem
              |
              +--gishur.core.FibonacciNode
All Implemented Interfaces:
java.lang.Cloneable, Cloneable, ControlledCloneable, KeyValueHolder, ListItem, java.io.Serializable

public class FibonacciNode
extends StdListItem

A FibonacciNode is only used for FibonacciHeaps! This is a StdListItem with added functionality to be useable for FibonacciHeaps. Basically, a FibonacciNode is as KeyValueHolder, where the value contains the actual object inserted into the FibonacciHeap and the key indicates its priority.

See Also:
Serialized Form

Field Summary
protected  SimpleList _childlist
           
protected  int _degree
           
protected  boolean _mark
           
protected  FibonacciNode _parent
           
 
Fields inherited from interface gishur.core.ListItem
CLEAR_CONNECTIONS, CONNECT_BACKWARD, CONNECT_FORWARD, REMOVE, SET_OWNER
 
Fields inherited from interface gishur.core.KeyValueHolder
SET_KEY, SET_VALUE
 
Fields inherited from interface gishur.core.ControlledCloneable
DEEP, FLAT
 
Constructor Summary
FibonacciNode(KeyValueHolder h)
          Constructor with KeyValueHolder.
FibonacciNode(java.lang.Object key)
          Constructor with key.
FibonacciNode(java.lang.Object key, java.lang.Object value)
          Constructor with key and value.
 
Method Summary
 java.lang.String toString()
          Overrides java.lang.Object.toString().
 
Methods inherited from class gishur.core.StdListItem
key, setKey, setValue, value
 
Methods inherited from class gishur.core.BasicListItem
answerConnect, clearConnections, clone, clone, connect, equals, find, findFirst, findLast, getIndex, getOwningList, isFirst, isLast, next, prev, remove, requestListAccess, setOwningList
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_mark

protected boolean _mark

_degree

protected int _degree

_parent

protected FibonacciNode _parent

_childlist

protected SimpleList _childlist
Constructor Detail

FibonacciNode

public FibonacciNode(java.lang.Object key,
                     java.lang.Object value)
Constructor with key and value.

FibonacciNode

public FibonacciNode(java.lang.Object key)
Constructor with key. The value will be null.

FibonacciNode

public FibonacciNode(KeyValueHolder h)
Constructor with KeyValueHolder. The key will be h.KeyValueHolder.key() and the value will be h.KeyValueHolder.value().
Method Detail

toString

public java.lang.String toString()
Overrides java.lang.Object.toString().
Overrides:
toString in class StdListItem
See Also:
Object.toString()