Constructor and Description |
---|
ImmutableHeap(IHeap<NODE> heap) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(NODE arg0) |
boolean |
addAll(Collection arg0) |
boolean |
addAll(NODE[] arg0)
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.
|
void |
clear() |
boolean |
contains(Object o) |
boolean |
containsAll(Collection<?> c) |
boolean |
containsAll(Object[] items)
Whether this heap contains all 'items'.
|
boolean |
decreaseKey(NODE arg0)
"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.
|
boolean |
isEmpty() |
Iterator<NODE> |
iterator() |
boolean |
remove(Object o) |
boolean |
removeAll(Collection<?> c) |
boolean |
retainAll(Collection<?> c) |
int |
size() |
Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
Set<NODE> |
toSet()
Returns this heap as a set.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
equals, hashCode
public boolean deleteMin()
IHeap
public boolean decreaseKey(NODE arg0)
IHeap
decreaseKey
in interface IHeap<NODE>
public boolean add(NODE arg0)
add
in interface Collection<NODE>
public boolean addAll(Collection arg0)
addAll
in interface Collection<NODE>
public boolean addAll(NODE[] arg0)
IHeap
public void clear()
clear
in interface Collection<NODE>
public boolean changedKey(NODE node)
IHeap
changedKey
in interface IHeap<NODE>
public boolean containsAll(Object[] items)
IHeap
containsAll
in interface IHeap<NODE>
public boolean empty()
IHeap
public Comparator<NODE> getComparator()
IHeap
getComparator
in interface IHeap<NODE>
public NODE getMin()
IHeap
public boolean increaseKey(NODE node)
IHeap
increaseKey
in interface IHeap<NODE>
public boolean contains(Object o)
contains
in interface Collection<NODE>
public boolean containsAll(Collection<?> c)
containsAll
in interface Collection<NODE>
public boolean isEmpty()
isEmpty
in interface Collection<NODE>
public boolean remove(Object o)
remove
in interface Collection<NODE>
public boolean removeAll(Collection<?> c)
removeAll
in interface Collection<NODE>
public boolean retainAll(Collection<?> c)
retainAll
in interface Collection<NODE>
public int size()
size
in interface Collection<NODE>
public Object[] toArray()
toArray
in interface Collection<NODE>
public <T> T[] toArray(T[] a)
toArray
in interface Collection<NODE>
Copyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.