t_min_pq * min_pq_new(const t_type *type)
Initializes a new empty priority queue.
void * min_pq_peek(const t_min_pq *pq)
Returns the smallest key in the queue.
size_t min_pq_size(const t_min_pq *pq)
Returns the number of keys in this queue.
void min_pq_add(t_min_pq *pq, const void *data)
Adds a copy of the specified element to the queue.
A full representation of a data type, used to achieve polymorphism in the implementation of data stru...
t_array t_min_pq
A priority queue of generic keys.
void * min_pq_pop(t_min_pq *pq)
Removes and returns the smallest key in this queue.
void min_pq_delete(t_min_pq *pq)
Deletes this queue and free all its items and the associated data.
t_min_pq * min_pq_copy(const t_min_pq *pq)
Copies the queue and all it contents.