Package org.jheaps.tree
Class CostlessMeldPairingHeap.Node<K,V>
- java.lang.Object
-
- org.jheaps.tree.CostlessMeldPairingHeap.Node<K,V>
-
- All Implemented Interfaces:
java.io.Serializable
,AddressableHeap.Handle<K,V>
- Enclosing class:
- CostlessMeldPairingHeap<K,V>
static class CostlessMeldPairingHeap.Node<K,V> extends java.lang.Object implements AddressableHeap.Handle<K,V>, java.io.Serializable
-
-
Field Summary
Fields Modifier and Type Field Description (package private) CostlessMeldPairingHeap<K,V>
heap
(package private) K
key
(package private) static byte
NO_INDEX
(package private) CostlessMeldPairingHeap.Node<K,V>
o_c
(package private) CostlessMeldPairingHeap.Node<K,V>
o_s
(package private) byte
poolIndex
private static long
serialVersionUID
(package private) V
value
(package private) CostlessMeldPairingHeap.Node<K,V>
y_s
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
decreaseKey(K newKey)
Decrease the key of the element.void
delete()
Delete the element from the heap that it belongs.K
getKey()
Return the key of the element.(package private) CostlessMeldPairingHeap<K,V>
getOwner()
V
getValue()
Return the value of the element.void
setValue(V value)
Set the value of the element.
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
NO_INDEX
static final byte NO_INDEX
- See Also:
- Constant Field Values
-
heap
CostlessMeldPairingHeap<K,V> heap
-
key
K key
-
value
V value
-
o_c
CostlessMeldPairingHeap.Node<K,V> o_c
-
y_s
CostlessMeldPairingHeap.Node<K,V> y_s
-
o_s
CostlessMeldPairingHeap.Node<K,V> o_s
-
poolIndex
byte poolIndex
-
-
Constructor Detail
-
Node
Node(CostlessMeldPairingHeap<K,V> heap, K key, V value)
-
-
Method Detail
-
getKey
public K getKey()
Return the key of the element.- Specified by:
getKey
in interfaceAddressableHeap.Handle<K,V>
- Returns:
- the key of the element
-
getValue
public V getValue()
Return the value of the element.- Specified by:
getValue
in interfaceAddressableHeap.Handle<K,V>
- Returns:
- the value of the element
-
setValue
public void setValue(V value)
Set the value of the element.- Specified by:
setValue
in interfaceAddressableHeap.Handle<K,V>
- Parameters:
value
- the new value
-
delete
public void delete()
Delete the element from the heap that it belongs.- Specified by:
delete
in interfaceAddressableHeap.Handle<K,V>
-
decreaseKey
public void decreaseKey(K newKey)
Decrease the key of the element.- Specified by:
decreaseKey
in interfaceAddressableHeap.Handle<K,V>
- Parameters:
newKey
- the new key
-
getOwner
CostlessMeldPairingHeap<K,V> getOwner()
-
-