|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
NODE
- public interface IHeap<NODE>
Interface for standard Heap (with addition of decreace/increase/changedKey operations).
We also assume that heap will use Comparator
for comparing stored nodes.
Method Summary | |
---|---|
boolean |
addAll(NODE[] items)
Adds all items from 'items'. |
boolean |
changedKey(NODE node)
"node" value has been changed (not sure if it was increased or decreased), bubble it through the heap. |
boolean |
containsAll(Object[] items)
Whether this heap contains all 'items'. |
boolean |
decreaseKey(NODE node)
"node" value has been decreased, bubble it through the heap. |
boolean |
deleteMin()
Deletes node with min-value, returns success (true if there was some object in the heap, false if there weren't). |
boolean |
empty()
Whether this heap is empty. |
Comparator<NODE> |
getComparator()
Returns comparator that is used to compare the nodes in the heap. |
NODE |
getMin()
Returns node with min-value from the heap. |
boolean |
increaseKey(NODE node)
"node" value has been increased, bubble it through the heap. |
Set<NODE> |
toSet()
Returns this heap as a set. |
Methods inherited from interface java.util.Collection |
---|
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray |
Method Detail |
---|
Comparator<NODE> getComparator()
NODE getMin()
boolean deleteMin()
boolean decreaseKey(NODE node)
node
-
boolean increaseKey(NODE node)
node
-
boolean changedKey(NODE node)
node
-
boolean addAll(NODE[] items)
items
-
boolean containsAll(Object[] items)
items
-
boolean empty()
Set<NODE> toSet()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |