|
C Container Collection (CCC)
|
#include <private_flat_priority_queue.h>

A flat priority queue is a binary heap in a contiguous buffer storing an implicit complete binary tree; elements are stored contiguously from [0, N). Starting at any node in the tree at index i the parent is at (i - 1) / 2, the left child is at (i * 2) + 1, and the right child is at (i * 2) + 2. The heap can be initialized as a min or max heap due to the use of the three way comparison function.
Data Fields | |
| CCC_Buffer | buffer |
| CCC_Order | order |
| CCC_Type_comparator * | compare |
| CCC_Buffer CCC_Flat_priority_queue::buffer |
The underlying Buffer owned by the flat_priority_queue.
| CCC_Type_comparator* CCC_Flat_priority_queue::compare |
The user defined three way comparison function.
| CCC_Order CCC_Flat_priority_queue::order |
The order CCC_ORDER_LESSER (min) or CCC_ORDER_GREATER (max) of the flat_priority_queue.