Package org.jheaps.tree
Class PairingHeap.Node<K,V>
java.lang.Object
org.jheaps.tree.PairingHeap.Node<K,V>
- All Implemented Interfaces:
Serializable,AddressableHeap.Handle<K,V>
- Enclosing class:
PairingHeap<K,V>
static class PairingHeap.Node<K,V>
extends Object
implements AddressableHeap.Handle<K,V>, Serializable
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) PairingHeap<K, V> (package private) K(package private) PairingHeap.Node<K, V> (package private) PairingHeap.Node<K, V> private static final long(package private) V(package private) PairingHeap.Node<K, V> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddecreaseKey(K newKey) Decrease the key of the element.voiddelete()Delete the element from the heap that it belongs.getKey()Return the key of the element.(package private) PairingHeap<K, V> getOwner()getValue()Return the value of the element.voidSet the value of the element.
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
heap
PairingHeap<K,V> heap -
key
K key -
value
V value -
o_c
PairingHeap.Node<K,V> o_c -
y_s
PairingHeap.Node<K,V> y_s -
o_s
PairingHeap.Node<K,V> o_s
-
-
Constructor Details
-
Node
Node(PairingHeap<K, V> heap, K key, V value)
-
-
Method Details
-
getKey
Return the key of the element.- Specified by:
getKeyin interfaceAddressableHeap.Handle<K,V> - Returns:
- the key of the element
-
getValue
Return the value of the element.- Specified by:
getValuein interfaceAddressableHeap.Handle<K,V> - Returns:
- the value of the element
-
setValue
Set the value of the element.- Specified by:
setValuein interfaceAddressableHeap.Handle<K,V> - Parameters:
value- the new value
-
decreaseKey
Decrease the key of the element.- Specified by:
decreaseKeyin interfaceAddressableHeap.Handle<K,V> - Parameters:
newKey- the new key
-
delete
public void delete()Delete the element from the heap that it belongs.- Specified by:
deletein interfaceAddressableHeap.Handle<K,V>
-
getOwner
PairingHeap<K,V> getOwner()
-