A pairing heap instance. More...
#include <pheap.h>
Data Fields | |
| pheap_node_t * | nodes |
| Array of all nodes, indexed by node id minus one. | |
| pheap_comparator | comparator |
| Comparator used to determine relative ordering of nodes. | |
| void * | user_data |
| User data pointer passed to the comparator. | |
| pheap_node_id_t | max_nodes |
| Maximum number of nodes the heap can hold. | |
| pheap_node_id_t | root_id |
| Id of the current root (minimum) node, or 0 if the heap is empty. | |
| pheap_node_id_t | free_head_id |
| Id of the first node in the free list, or 0 if none. | |
| pheap_node_id_t | free_tail_id |
| Id of the last node in the free list, or 0 if none. | |
A pairing heap instance.
Maintains the state for a pairing heap. Create with ph_create() or initialise statically with PHEAP_DEFINE_STATIC() and ph_post_alloc_init().