24 #ifndef _BINARYHEAP_H_ 25 #define _BINARYHEAP_H_ 27 #if !defined (SERVER_MODE) && !defined (SA_MODE) 28 #error Belongs to server module 79 #define BH_ELEMENT(heap, i) (((char *) (heap)->members) + (heap)->elem_size * (i)) 80 #define BH_ROOT(heap) ((heap)->members) 102 #if defined(CUBRID_DEBUG) 103 extern bool bh_tests_consistent (
BINARY_HEAP * heap);
void bh_destroy(THREAD_ENTRY *thread_p, BINARY_HEAP *heap)
bool bh_peek_max(BINARY_HEAP *heap, void *peek_elem)
int bh_insert(BINARY_HEAP *heap, void *elem)
BH_TRY_INSERT_RESULT bh_try_insert(BINARY_HEAP *heap, void *elem, void *replaced)
bool bh_is_full(BINARY_HEAP *heap)
void bh_down_heap(BINARY_HEAP *heap, int index)
bh_key_comparator cmp_func
bool bh_extract_max(BINARY_HEAP *heap, void *extract_elem)
bool bh_is_consistent(BINARY_HEAP *heap)
BH_CMP_RESULT(* bh_key_comparator)(const void *left, const void *right, BH_CMP_ARG arg)
void bh_element_at(BINARY_HEAP *heap, int index, void *elem)
void bh_to_sorted_array(BINARY_HEAP *heap)
void bh_build_heap(BINARY_HEAP *heap)
int bh_add(BINARY_HEAP *heap, void *elem)
BINARY_HEAP * bh_create(THREAD_ENTRY *thread_p, int max_capacity, int elem_size, bh_key_comparator cmp_func, BH_CMP_ARG cmp_arg)