30 int (*
fc)(
void*,
void*);
Macros and functions to help memory allocation.
Type used to represent a binary heap.
Definition type_binheap.h:26
void ** array
Array which stores all values inside the heap.
Definition type_binheap.h:27
uint size_array
Size of the array.
Definition type_binheap.h:28
uint size_heap
Size of the heap (number of values which are currently stored).
Definition type_binheap.h:29
int(* fc)(void *, void *)
Comparison function utilized by the heap.
Definition type_binheap.h:30
void push_binheap(binheap *, void *)
Inserts a new value inside a binary heap.
Definition type_binheap.c:105
int fcmp_int(void *x, void *y)
Comparison function for integers.
Definition type_binheap.c:8
void delete_binheap(binheap *)
Release of a binary heap.
Definition type_binheap.c:73
int fcmp_uint(void *x, void *y)
Comparison function for usigned integers.
Definition type_binheap.c:12
int getsize_binheap(binheap *)
Computes the size of of a binary heap.
Definition type_binheap.c:85
void * peekmin_binheap(binheap *)
Computes the minimum value of a binary heap without removing it.
Definition type_binheap.c:116
void * popmin_binheap(binheap *)
Computes the minimum value of a binary heap and removes it.
Definition type_binheap.c:143
binheap * create_binheap(int(*)(void *, void *))
Creation of an empty binary heap.
Definition type_binheap.c:62
bool isempty_binheap(binheap *)
Tests if a binary heap is empty.
Definition type_binheap.c:80