A bool Add(ref IPriorityQueueHandle<T> handle, T item) |
Add an item to the priority queue, receiving a
handle for the item in the queue,
or reusing an existing unused handle.
Returns: | | Parameters: | handle: | On output: a handle for the added item.
On input: null for allocating a new handle, or a currently unused handle for reuse.
A handle for reuse must be compatible with this priority queue,
by being created by a priority queue of the same runtime type, but not
necessarily the same priority queue object. | item: | |
|
A T Delete(IPriorityQueueHandle<T> handle) |
Delete an item with a handle from a priority queue
Returns: | The deleted item | Parameters: | handle: | The handle for the item. The handle will be invalidated, but reusable. |
|
A T DeleteMax() |
Remove the largest item from this priority queue.
Returns: | The removed item. |
|
A T DeleteMax(out IPriorityQueueHandle<T> handle) |
Remove the largest item from this priority queue.
Returns: | The removed item. | Parameters: | handle: | On return: the handle of the removed item. |
|
A T DeleteMin() |
Remove the least item from this priority queue.
Returns: | The removed item. |
|
A T DeleteMin(out IPriorityQueueHandle<T> handle) |
Remove the least item from this priority queue.
Returns: | The removed item. | Parameters: | handle: | On return: the handle of the removed item. |
|
A bool Find(IPriorityQueueHandle<T> handle, out T item) |
Check if the entry corresponding to a handle is in the priority queue.
Returns: | | Parameters: | handle: | | item: | |
|
A T FindMax() |
Find the current largest item of this priority queue.
Returns: | The largest item. |
|
A T FindMax(out IPriorityQueueHandle<T> handle) |
Find the current largest item of this priority queue.
Returns: | The largest item. | Parameters: | handle: | On return: the handle of the item. |
|
A T FindMin() |
Find the current least item of this priority queue.
|
A T FindMin(out IPriorityQueueHandle<T> handle) |
Find the current least item of this priority queue.
Returns: | The least item. | Parameters: | handle: | On return: the handle of the item. |
|
A T Replace(IPriorityQueueHandle<T> handle, T item) |
Replace an item with a handle in a priority queue with a new item.
Typically used for changing the priority of some queued object.
Returns: | The old item | Parameters: | handle: | The handle for the old item | item: | The new item |
|