Package org.jheaps.tree
Class CostlessMeldPairingHeap.Node<K,V>
java.lang.Object
org.jheaps.tree.CostlessMeldPairingHeap.Node<K,V>
- All Implemented Interfaces:
Serializable
,AddressableHeap.Handle<K,
V>
- Enclosing class:
CostlessMeldPairingHeap<K,
V>
static class CostlessMeldPairingHeap.Node<K,V>
extends Object
implements AddressableHeap.Handle<K,V>, Serializable
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) CostlessMeldPairingHeap
<K, V> (package private) K
(package private) static final byte
(package private) CostlessMeldPairingHeap.Node
<K, V> (package private) CostlessMeldPairingHeap.Node
<K, V> (package private) byte
private static final long
(package private) V
(package private) CostlessMeldPairingHeap.Node
<K, V> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
decreaseKey
(K newKey) Decrease the key of the element.void
delete()
Delete the element from the heap that it belongs.getKey()
Return the key of the element.(package private) CostlessMeldPairingHeap
<K, V> getOwner()
getValue()
Return the value of the element.void
Set the value of the element.
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
NO_INDEX
static final byte NO_INDEX- See Also:
-
heap
CostlessMeldPairingHeap<K,V> heap -
key
K key -
value
V value -
o_c
-
y_s
-
o_s
-
poolIndex
byte poolIndex
-
-
Constructor Details
-
Node
Node(CostlessMeldPairingHeap<K, V> heap, K key, V value)
-
-
Method Details
-
getKey
Return the key of the element.- Specified by:
getKey
in interfaceAddressableHeap.Handle<K,
V> - Returns:
- the key of the element
-
getValue
Return the value of the element.- Specified by:
getValue
in interfaceAddressableHeap.Handle<K,
V> - Returns:
- the value of the element
-
setValue
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
Decrease the key of the element.- Specified by:
decreaseKey
in interfaceAddressableHeap.Handle<K,
V> - Parameters:
newKey
- the new key
-
getOwner
CostlessMeldPairingHeap<K,V> getOwner()
-