bend-collections
Search uses release 1.0.0.0 · 4,483 definitions
Definitions (4,483)
- type Heap
- def max_depth
- def le
- def empty_slots
- def new
- def length
- def slot_orThe slot value, with a default that a well-formed heap never needs (every index a sift loop reads is inside [0, size), where the slot is Some).
- def item_of
- type Up
- def parentThe parent index of i (i > 0).
- def up_dec
- def up_mb
- def up_slot
- def up_root
- def up_probeWhere the value x, currently destined for slot i, must go next.
- def up_go
- def sift_upPlace x at slot i and restore heap order upwards (fuel bounds the climb).
- type Down
- def down_dec
- def down_two
- def down_rmb
- def down_rslot
- def down_lmb
- def down_lslot
- def down_has
- def down_probeWhere the value x, currently destined for slot i of a heap of `size` elements, must go next.
- def down_go
- def sift_downPlace x at slot i of a heap of `size` elements and restore heap order down.
- def grownDoubling: the old block becomes the lower half of a block one level deeper, so every element keeps its index.
- def push_room
- def push
- def peek_found
- def peek_go
- def peek
- def pop_moveThe last element has been taken out of slot m = n - 1; put it at the root and sift it down over the remaining m elements.
- def pop_last
- def pop_withThe last element is READ, not cleared: the invariant says nothing about the slots above the size, so clearing it would be one array write per pop that the algorithm does not need (the C reference does not do it either).
- def pop_root
- def pop_go
- def pop
- def from_list_go
- def from_list
- type Drain
- def burnDropping the (linear) block is O(1): the runtime erases it.
- def burn_cons