void Clear() | Empties the queue and the lookups. |
bool Contains(TItem item) | True if the item is queued at least once. |
TItem Dequeue() | Removes and returns the first item. Throws if the queue is empty. |
void Enqueue(TItem item, TPriority priority) | Adds the item with a priority. The same item can be queued more than once. |
bool EnqueueWithoutDuplicates(TItem item, TPriority priority) | Adds the item only if it is not queued yet. Returns false if it already is. |
IEnumerator<TItem> GetEnumerator() | Returns a snapshot of the queued items, in heap order (not sorted). |
TPriority GetPriority(TItem item) | Returns the item's priority. Throws if it is not queued. |
bool IsValidQueue() | Debug check that the lookups and the heap agree. |
void Remove(TItem item) | Removes one entry of the item. Throws if it is not queued. |
bool TryDequeue(out TItem first) | Like Dequeue, but returns false instead of throwing on an empty queue. |
bool TryFirst(out TItem first) | Like First, but returns false instead of throwing on an empty queue. |
bool TryGetPriority(TItem item, out TPriority priority) | Like GetPriority, but returns false if the item is not queued. |
bool TryRemove(TItem item) | Like Remove, but returns false if the item is not queued. |
bool TryUpdatePriority(TItem item, TPriority priority) | Like UpdatePriority, but returns false if the item is not queued. |
void UpdatePriority(TItem item, TPriority priority) | Changes the priority of one entry of the item. Throws if it is not queued. |