Copyright (C) 2006-2007 Rob Hess <hess@eecs.oregonstate.edu>
#include <stdlib.h>
Data Structures | |
| struct | pq_node |
| an element in a minimizing priority queue More... | |
| struct | min_pq |
| a minimizing priority queue More... | |
Functions | |
| min_pq * | minpq_init () |
| Creates a new minimizing priority queue. | |
| int | minpq_insert (struct min_pq *min_pq, void *data, int key) |
| Inserts an element into a minimizing priority queue. | |
| 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 the 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_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.
| min_pq | a minimizing priority queue | |
| data | the data to be inserted | |
| key | the key to be associated with data |
| void* minpq_get_min | ( | struct min_pq * | min_pq | ) |
| void* minpq_extract_min | ( | struct min_pq * | min_pq | ) |
| void minpq_release | ( | struct min_pq ** | min_pq | ) |
De-allocates the memory held by a minimizing priorioty queue.
| min_pq | pointer to a minimizing priority queue |
1.5.2