void * cr8r_heap_top(cr8r_vec *, cr8r_vec_ft *)
Get the top (typically max) element of a heap.
bool cr8r_heap_pop(cr8r_vec *, cr8r_vec_ft *, void *o, int ord)
Remove the top (typically max) element from the heap (has no relevant ordering guarantee)
void cr8r_heap_ify(cr8r_vec *, cr8r_vec_ft *, int ord)
Turn a vector into a heap in place in linear time.
void cr8r_heap_sift_up(cr8r_vec *, cr8r_vec_ft *, void *e, int ord)
Move an element up the heap as necessary to restore the heap invariant.
bool cr8r_heap_push(cr8r_vec *, cr8r_vec_ft *, const void *e, int ord)
Add a new element to the heap.
void cr8r_heap_sift_down(cr8r_vec *, cr8r_vec_ft *, void *e, int ord)
Move an element down the heap as necessary to restore the heap invariant.
Function table for vector.
A vector Take care if manipulating these fields directly, this should only be done if the functions i...