C Container Collection (CCC)
Loading...
Searching...
No Matches
CCC_Flat_priority_queue Struct Reference

#include <private_flat_priority_queue.h>

Collaboration diagram for CCC_Flat_priority_queue:

Detailed Description

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_comparatorcompare
 

Field Documentation

◆ buffer

CCC_Buffer CCC_Flat_priority_queue::buffer

The underlying Buffer owned by the flat_priority_queue.

◆ compare

CCC_Type_comparator* CCC_Flat_priority_queue::compare

The user defined three way comparison function.

◆ order

CCC_Order CCC_Flat_priority_queue::order

The order CCC_ORDER_LESSER (min) or CCC_ORDER_GREATER (max) of the flat_priority_queue.


The documentation for this struct was generated from the following file: