Lines Matching full:element
15 the smallest element is always at the root.
107 Accessing the Top Element
112 element = min_heap_peek(heap);
115 element.
117 This macro returns a pointer to the smallest element (the root) of the heap, or
127 success = min_heap_push(heap, element, callbacks, args);
129 - **heap**: A pointer to the min-heap into which the element should be inserted.
130 - **element**: A pointer to the element to be inserted into the heap.
135 This macro inserts an element into the heap. It returns `true` if the insertion
138 **Inline Version:** min_heap_push_inline(heap, element, callbacks, args)
147 - **heap**: A pointer to the min-heap from which to remove the smallest element.
152 This macro removes the smallest element (the root) from the heap. It returns
153 `true` if the element was successfully removed, or `false` if the heap is
173 This macro restores the heap property by moving the element at the specified
184 - **idx**: The index of the element to sift up.
189 This macro restores the heap property by moving the element at the specified
217 - **idx**: The index of the element to delete.
222 This macro removes an element at the specified index (`idx`) from the heap and
288 /* Peek at the top element (should be 1 in this case) */
290 pr_info("Top element: %d\n", *top);
292 /* Pop the top element (1) and get the new top (2) */
295 pr_info("New top element: %d\n", *top);
297 /* Insert a new element (0) and recheck the top */
301 pr_info("Top element after insertion: %d\n", *top);