heap
Binary Heap (generic min/max)
Functions
| Function | Description |
|---|---|
heap_pages_for | |
heap_new | |
heap_min | |
heap_max | |
heap_cmp | Internal: should a come before b based on heap mode? |
heap_grow | |
heap_sift_up | |
heap_sift_down | |
heap_push | |
heap_pop | |
heap_peek | |
heap_len | |
heap_empty | |
heap_from_vec | Build heap from existing vec. |
heap_sort | Heap sort a vec ascending in-place. |
Details
heap_pages_for
fn heap_pages_for(n: i64) -> i64heap_new
fn heap_new(cap: i64, mode: i64) -> &i64heap_min
fn heap_min(cap: i64) -> &i64heap_max
fn heap_max(cap: i64) -> &i64heap_cmp
fn heap_cmp(a: i64, b: i64, mode: i64) -> i64Internal: should a come before b based on heap mode?
heap_grow
fn heap_grow(h: &i64)heap_sift_up
fn heap_sift_up(h: &i64, idx: i64)heap_sift_down
fn heap_sift_down(h: &i64, idx: i64)heap_push
fn heap_push(h: &i64, val: i64)heap_pop
fn heap_pop(h: &i64) -> i64heap_peek
fn heap_peek(h: &i64) -> i64heap_len
fn heap_len(h: &i64) -> i64heap_empty
fn heap_empty(h: &i64) -> i64heap_from_vec
fn heap_from_vec(v: &i64, mode: i64) -> &i64Build heap from existing vec.
heap_sort
fn heap_sort(v: &i64)Heap sort a vec ascending in-place.