|
ATLAS Offline Software
|
Go to the documentation of this file.
38 #ifndef ALGORITHM_BINARY_HEAP_H
39 #define ALGORITHM_BINARY_HEAP_H
73 #define BINARY_HEAP_NULL ((void *) 0)
int(* BinaryHeapCompareFunc)(BinaryHeapValue value1, BinaryHeapValue value2)
Type of function used to compare values in a binary heap.
void * BinaryHeapValue
A value stored in a BinaryHeap.
@ BINARY_HEAP_TYPE_MIN
A minimum heap.
int binary_heap_insert(BinaryHeap *heap, BinaryHeapValue value)
Insert a value into a binary heap.
int binary_heap_num_entries(BinaryHeap *heap)
Find the number of values stored in a binary heap.
void binary_heap_free(BinaryHeap *heap)
Destroy a binary heap.
@ BINARY_HEAP_TYPE_MAX
A maximum heap.
BinaryHeapValue binary_heap_pop(BinaryHeap *heap)
Remove the first value from a binary heap.
struct _BinaryHeap BinaryHeap
A binary heap data structure.
BinaryHeap * binary_heap_new(BinaryHeapType heap_type, BinaryHeapCompareFunc compare_func)
Create a new BinaryHeap.