public class HeapQueue<T> implements SortedQueue<T>
Modifier and Type | Field and Description |
---|---|
Fun_0_2 <T,T,Int> |
comparator
Field Type: (T,T)=>Int
|
List<T> |
heap |
Constructor and Description |
---|
HeapQueue(Fun_0_2 <T,T,Int> comparator)
Declaration: this(comparator:(T,T)=>Int):cassia.util.HeapQueue[T].
|
Modifier and Type | Method and Description |
---|---|
Boolean |
add(T x) |
Boolean |
contains(T x) |
void |
heapify() |
ListIterator<T> |
iterator() |
static void |
main(Rail<String> id$45) |
T |
peek() |
T |
pop() |
Boolean |
push(T x) |
Boolean |
remove(T x) |
Boolean |
removeAllWhere(Fun_0_1 <T,Boolean> p)
Declaration: removeAllWhere(p:(T)=>Boolean):Boolean.
|
void |
siftdown(Long k,
T x) |
void |
siftup(Long k,
T x) |
Long |
size() |
List<T> |
toList() |
public List<T> heap
public Boolean push(T x)
public T pop()
public T peek()
public Boolean add(T x)
public Boolean remove(T x)
public Boolean removeAllWhere(Fun_0_1 <T,Boolean> p)
public Long size()
public Boolean contains(T x)
public ListIterator<T> iterator()
public List<T> toList()
public void heapify()
public void siftup(Long k, T x)
public void siftdown(Long k, T x)
public static void main(Rail<String> id$45)