 |
Crossfire Server, Trunk
1.75.0
|
Go to the documentation of this file.
32 MinHeap *
minheap_init(
int amt,
int (*measure_func)(
const void *),
void (*cleanup_func)(
void *));
int capacity
The capacity of the min-heap.
int(* get_measure)(const void *)
Functon to get the measured quantity from the stored data.
In order to adequately path for A* search, we will need a minheap to efficiently handle pathing from ...
int len
The in-use length of the min-heap.
MinHeap * minheap_init(int amt, int(*measure_func)(const void *), void(*cleanup_func)(void *))
Function to intialize the minheap.
void * minheap_remove(MinHeap *heap)
Pops the top of the minheap off.
void minheap_init_static(MinHeap *heap, void **arr, int amt, int(*measure_func)(const void *))
Initialize the minheap using statically allocated components.
int minheap_insert(MinHeap *heap, void *ob)
Inserts an element into the min-heap.
void minheap_free(MinHeap *to_free)
Cleans the minheap.
void(* element_cleanup)(void *)
Function pointer to clean up the elements.
void ** arr
The heap array.