Std.Heap
18 public declarations
- contains
&Std.Heap.Heap[T] -> T -> Bool where T: EqWhether an element is present.
- dropMin
&Std.Heap.Heap[T] -> Std.Heap.Heap[T] where T: OrdThe heap without its smallest element, unchanged when it is empty.
- empty
Std.Heap.Heap[T]A heap with nothing in it.
- filter
&Std.Heap.Heap[T] -> fn(T) -> Bool -> Std.Heap.Heap[T] where T: OrdA heap of every element that satisfies a test.
- fromArray
&Array[T] -> Std.Heap.Heap[T] where T: OrdA heap holding every element of an array.
- Heap
A collection that always knows its smallest element.
- isEmpty
&Std.Heap.Heap[T] -> BoolWhether the heap holds nothing.
- map
&Std.Heap.Heap[A] -> fn(A) -> B -> Std.Heap.Heap[B] where B: OrdA heap of every element transformed.
- merge
&Std.Heap.Heap[T] -> &Std.Heap.Heap[T] -> Std.Heap.Heap[T] where T: OrdTwo heaps joined into one.
- one
T -> Std.Heap.Heap[T]A heap of one element.
- peek
&Std.Heap.Heap[T] -> Option[T]The smallest element, or `None` for an empty heap.
- pop
&Std.Heap.Heap[T] -> Option[(T, Std.Heap.Heap[T])] where T: OrdThe smallest element and the heap without it, or `None` when empty.
- push
&Std.Heap.Heap[T] -> T -> Std.Heap.Heap[T] where T: OrdThe heap with an element added.
- size
&Std.Heap.Heap[T] -> IntHow many elements the heap holds.
- smallest
&Std.Heap.Heap[T] -> Int -> Array[T] where T: OrdThe smallest few elements, in order.
- toArray
&Std.Heap.Heap[T] -> Array[T]Every element, in no particular order beyond the smallest being reachable.
- toSortedArray
&Std.Heap.Heap[T] -> Array[T] where T: OrdEvery element, smallest first.
- union
&Std.Heap.Heap[T] -> &Std.Heap.Heap[T] -> Std.Heap.Heap[T] where T: OrdTwo heaps' elements in one heap.
