Skip to main content

IPriorityQueue<TItem, TPriority>

An interface in Alta.Timing.Runtime, Alta.Timing.PriorityQueue.

Common interface of the priority queues in this namespace (a copy of the BlueRaja priority queue library). The lowest priority value comes out first.

Properties​

MemberWhat it is
int Count { get; }Number of queued items.
TItem First { get; }The item that Dequeue would return, without removing it.

Methods​

MemberWhat it is
void Clear()Empties the queue.
bool Contains(TItem node)True if the item is queued.
TItem Dequeue()Removes and returns the item with the lowest priority value.
void Enqueue(TItem node, TPriority priority)Adds an item with a priority.
void Remove(TItem node)Removes a queued item from anywhere in the queue.
void UpdatePriority(TItem node, TPriority priority)Changes a queued item's priority and moves it to its new place.