GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LDT / dev > encdec / rhel6-32
#include <LDT/HEAP.h>
#include <stdlib.h>
Functions | |
void | HEAP_init (HEAP *heap, HEAP_compare compare, HEAP_destroy destroy) |
Initializes a heap for use. | |
void | HEAP_free (HEAP *heap) |
Frees all the nodes of the heap. | |
int | HEAP_insert (HEAP *heap, const void *data) |
Inserts a node with the specified data on the heap. | |
int | HEAP_extract (HEAP *heap, void **data) |
Extracts (removes) the top node of the heap. |
CVS $Id
int HEAP_extract | ( | HEAP * | heap, | |
void ** | data | |||
) |
Extracts (removes) the top node of the heap.
heap | The heap to remove the node from | |
data | Returned as a pointer to the data associated with the node |
References _HEAP::compare, HEAP__size(), _HEAP::size, and _HEAP::tree.
HEAP_free | ( | HEAP * | heap | ) |
Frees all the nodes of the heap.
heap | The heap to free |
References _HEAP::destroy, HEAP__size(), and _HEAP::tree.
void HEAP_init | ( | HEAP * | heap, | |
HEAP_compare | compare, | |||
HEAP_destroy | destroy | |||
) |
Initializes a heap for use.
heap | The heap control structure to initialize | |
compare | Callback comparision routine | |
destroy | Callback destruction (free) routine |
References _HEAP::compare, _HEAP::destroy, _HEAP::size, and _HEAP::tree.
int HEAP_insert | ( | HEAP * | heap, | |
const void * | data | |||
) |
Inserts a node with the specified data on the heap.
heap | The heap to insert the node on | |
data | The data |
References _HEAP::compare, HEAP__size(), _HEAP::size, and _HEAP::tree.