|
| JUNO_STATUS_T | JunoDs_Heap_Init (JUNO_DS_HEAP_ROOT_T *ptHeap, const JUNO_DS_HEAP_POINTER_API_T *ptHeapPointerApi, JUNO_DS_ARRAY_ROOT_T *ptHeapArray, JUNO_FAILURE_HANDLER_T pfcnFailureHdlr, JUNO_USER_DATA_T *pvUserData) |
| | Initialize a heap over a backing array and element pointer API.
|
| |
| static JUNO_DS_HEAP_INDEX_RESULT_T | JunoDs_Heap_ChildGetLeft (JUNO_DS_HEAP_ROOT_T *ptHeap, size_t iIndex) |
| | Compute the left child index of iIndex.
|
| |
| static JUNO_DS_HEAP_INDEX_RESULT_T | JunoDs_Heap_ChildGetRight (JUNO_DS_HEAP_ROOT_T *ptHeap, size_t iIndex) |
| | Compute the right child index of iIndex.
|
| |
| static JUNO_DS_HEAP_INDEX_RESULT_T | JunoDs_Heap_ChildGetParent (JUNO_DS_HEAP_ROOT_T *ptHeap, size_t iIndex) |
| | Compute the parent index of iIndex.
|
| |
| JUNO_STATUS_T | JunoDs_Heap_Update (JUNO_DS_HEAP_ROOT_T *ptHeap) |
| | Bubble-up the last inserted element to restore the heap property.
|
| |
| JUNO_STATUS_T | JunoDs_Heap_SiftDown (JUNO_DS_HEAP_ROOT_T *ptHeap, size_t iStart) |
| | Sift down from a starting index to restore the heap property.
|
| |
| JUNO_STATUS_T | JunoDs_Heap_Insert (JUNO_DS_HEAP_ROOT_T *ptHeap, JUNO_POINTER_T tValue) |
| | Reserve a new slot at the end of the heap array and return its index.
|
| |
| JUNO_STATUS_T | JunoDs_Heap_Heapify (JUNO_DS_HEAP_ROOT_T *ptHeap) |
| | Build a heap in-place from the current array contents.
|
| |
| JUNO_STATUS_T | JunoDs_Heap_Pop (JUNO_DS_HEAP_ROOT_T *ptHeap, JUNO_POINTER_T tReturn) |
| | Remove the root element and restore the heap property.
|
| |