priority queue functions
name of the priority queue
structure to be inserted in the queue
The initialize function makes the necessary assignments (side effects) so that the queue pq is initialized with an empty queue. The queue pq is treated as an unbounded array of the inserted records. Additionally, pq0 maintains the number of entries in the queue.
The insert function adds an element to the queue. The queue is a maximum queue, that is, the maximum element is kept on the head of the queue. The criteria for ordering the queue is giving by NewRecord1 and hence this value should exist and be comparable.
The extract function returns the stored record with the highest value (in its first position) and deletes this record from the queue.
Multiple priority queues are allowed.
If inspection alone is desired, the maximum element of the queue is always at pq1.
To use a priqueue function, either define that specific function alone by the command with(priqueue,function), or define all priqueue functions by the command with(priqueue).
Download Help Document