Crossfire Server, Trunk
minheap.h
Go to the documentation of this file.
1 #ifndef MINHEAP_H
2 #define MINHEAP_H
3 
16 struct MinHeap {
18  void **arr;
20  int len;
22  int capacity;
25  int (*get_measure)(const void *);
29  void (*element_cleanup)(void *);
30 };
31 
32 MinHeap *minheap_init(int amt, int (*measure_func)(const void *), void (*cleanup_func)(void *));
33 void minheap_init_static(MinHeap *heap, void **arr, int amt, int (*measure_func)(const void *));
34 int minheap_insert(MinHeap *heap, void *ob);
35 void *minheap_remove(MinHeap *heap);
36 void minheap_free(MinHeap *to_free);
37 
38 #endif
MinHeap::capacity
int capacity
Definition: minheap.h:22
MinHeap::get_measure
int(* get_measure)(const void *)
Definition: minheap.h:25
MinHeap
Definition: minheap.h:16
guildjoin.ob
ob
Definition: guildjoin.py:42
MinHeap::len
int len
Definition: minheap.h:20
minheap_init
MinHeap * minheap_init(int amt, int(*measure_func)(const void *), void(*cleanup_func)(void *))
Definition: minheap.cpp:129
nlohmann::detail::void
j template void())
Definition: json.hpp:4099
minheap_remove
void * minheap_remove(MinHeap *heap)
Definition: minheap.cpp:209
minheap_init_static
void minheap_init_static(MinHeap *heap, void **arr, int amt, int(*measure_func)(const void *))
Definition: minheap.cpp:162
make_face_from_files.int
int
Definition: make_face_from_files.py:26
minheap_insert
int minheap_insert(MinHeap *heap, void *ob)
Definition: minheap.cpp:184
minheap_free
void minheap_free(MinHeap *to_free)
Definition: minheap.cpp:226
MinHeap::element_cleanup
void(* element_cleanup)(void *)
Definition: minheap.h:29
MinHeap::arr
void ** arr
Definition: minheap.h:18