|
|
|||||||||||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||||||||||
public interface Heap<K extends Comparable<K>,V extends Identifiable>
Encapsulates methods common to all heaps.
| Method Summary | |
|---|---|
void |
addNode(HeapNode<K,V> node)
Adds a node to this heap. |
void |
flowUp(int index)
Moves up a node at the specified index until it satisfies the heaporder. |
Integer |
getIndexOf(V value)
Returns the current index of the specified value in this heap. |
HeapNode<K,V> |
getMinNode()
Retrieves and removes the minimum node of this heap. |
HeapNode<K,V> |
getNodeAt(int index)
Returns the node at the specified index. |
boolean |
isEmpty()
Indicates wether this heap ist empty. |
int |
size()
Returns the size of this heap. |
| Method Detail |
|---|
void addNode(HeapNode<K,V> node)
node - the node to be addedHeapNode<K,V> getMinNode()
boolean isEmpty()
Integer getIndexOf(V value)
value - the value for which the index should be returned
HeapNode<K,V> getNodeAt(int index)
index - the index of the node to be returned
void flowUp(int index)
index - the index of the node to be moved up.int size()
|
|
||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||||