Interface IPriorityQueue<T>
A generic collection of items prioritized by a comparison (order) relation. Supports adding items and reporting or removing extremal elements.
When adding an item, the user may choose to have a handle allocated for this item in the queue. The resulting handle may be used for deleting the item even if not extremal, and for replacing the item. A priority queue typically only holds numeric priorities associated with some objects maintained separately in other collection objects.
Inherited Members
Assembly: DistributedLucene.Net.dll
Syntax
public interface IPriorityQueue<T> : IExtensible<T>, ICollectionValue<T>, Collections.Generic.IEnumerable<T>, IShowable, IFormattable
Type Parameters
Name | Description |
---|---|
T |
Properties
Name | Description |
---|---|
Comparer | The comparer object supplied at creation time for this collection |
Item[IPriorityQueueHandle<T>] | Get or set the item corresponding to a handle. Throws exceptions on invalid handles. |
Methods
Name | Description |
---|---|
Add(ref IPriorityQueueHandle<T>, T) | Add an item to the priority queue, receiving a handle for the item in the queue, or reusing an existing unused handle. |
Delete(IPriorityQueueHandle<T>) | Delete an item with a handle from a priority queue |
DeleteMax() | Remove the largest item from this priority queue. |
DeleteMax(out IPriorityQueueHandle<T>) | Remove the largest item from this priority queue. |
DeleteMin() | Remove the least item from this priority queue. |
DeleteMin(out IPriorityQueueHandle<T>) | Remove the least item from this priority queue. |
Find(IPriorityQueueHandle<T>, out T) | Check if the entry corresponding to a handle is in the priority queue. |
FindMax() | Find the current largest item of this priority queue. |
FindMax(out IPriorityQueueHandle<T>) | Find the current largest item of this priority queue. |
FindMin() | Find the current least item of this priority queue. |
FindMin(out IPriorityQueueHandle<T>) | Find the current least item of this priority queue. |
Replace(IPriorityQueueHandle<T>, T) | Replace an item with a handle in a priority queue with a new item. Typically used for changing the priority of some queued object. |