public class GenericFibonacciHeap.Node extends Object
Modifier and Type | Method and Description |
---|---|
void |
decreaseKey(K k)
Decreases the key value.
|
void |
delete()
Deletes a node from the heap.
|
T |
getData()
Obtain the data for this node.
|
K |
getKey()
Obtain the key for this node.
|
void |
setData(T data)
Set the data of this node
|
String |
toString()
Return the string representation of this object.
|
public K getKey()
public T getData()
public void setData(T data)
data
- the new datapublic void decreaseKey(K k)
Running time: $O(1)$ amortized
k
- new key value for node xIllegalArgumentException
- thrown if k is larger than the current keypublic void delete()
Running time: O(log n) amortized
Copyright © 2018. All rights reserved.