20 #define MINPQ_INIT_NALLOCD 512 a minimizing priority queue
struct min_pq * minpq_init()
Creates a new minimizing priority queue.
int n
number of elements in pq
struct pq_node * pq_array
void minpq_release(struct min_pq **min_pq)
De-allocates the memory held by a minimizing priorioty queue
int minpq_insert(struct min_pq *min_pq, void *data, int key)
Inserts an element into a minimizing priority queue.
void * minpq_extract_min(struct min_pq *min_pq)
Removes and returns the element of a minimizing priority queue with the smallest key...
void * minpq_get_min(struct min_pq *min_pq)
Returns the element of a minimizing priority queue with the smallest key without removing it from th...
GLsizei GLsizei GLenum GLenum const GLvoid * data
an element in a minimizing priority queue