|
static int | resize_queue (QUEUE *queue, PSI_memory_key key, uint max_elements) |
|
int | init_queue (QUEUE *queue, PSI_memory_key psi_key, uint max_elements, uint offset_to_key, bool max_at_top, int(*compare)(void *, uchar *, uchar *), void *first_cmp_arg) |
|
int | reinit_queue (QUEUE *queue, PSI_memory_key psi_key, uint max_elements, uint offset_to_key, bool max_at_top, int(*compare)(void *, uchar *, uchar *), void *first_cmp_arg) |
|
void | delete_queue (QUEUE *queue) |
|
void | queue_insert (QUEUE *queue, uchar *element) |
|
uchar * | queue_remove (QUEUE *queue, uint idx) |
|
void | _downheap (QUEUE *queue, uint idx) |
|
void | queue_fix (QUEUE *queue) |
|
Code for handling of priority Queues.
Implementation of queues from "Algorithms in C" by Robert Sedgewick. An optimisation of _downheap suggested in Exercise 7.51 in "Data
Structures & Algorithms in C++" by Mark Allen Weiss, Second Edition was implemented by Mikael Ronstrom 2005. Also the O(N) algorithm of queue_fix was implemented.