Interface IUpdatablePriorityQueue<T>
An IPriorityQueue<T> which supports priority update and item removal.
Inherited Members
Namespace: MoreStructures.PriorityQueues
Assembly: MoreStructures.dll
Syntax
public interface IUpdatablePriorityQueue<T> : IPriorityQueue<T>
Type Parameters
Name | Description |
---|---|
T |
Methods
| Improve this Doc View SourceGetPrioritiesOf(T)
Returns all the priorities with which item
is registered in the queue, sorted by highest
to smallest.
Declaration
IEnumerable<int> GetPrioritiesOf(T item)
Parameters
Type | Name | Description |
---|---|---|
T | item | The item, to retrieve priorities of. |
Returns
Type | Description |
---|---|
IEnumerable<System.Int32> | The sequence of System.Int32 values, each being a priority. |
Remove(T)
Removes the first occurrence of the provided item
from the queue.
Declaration
PrioritizedItem<T>? Remove(T item)
Parameters
Type | Name | Description |
---|---|---|
T | item | The item to be removed. |
Returns
Type | Description |
---|---|
System.Nullable<MoreStructures.PriorityQueues.PrioritizedItem<T>> | The MoreStructures.PriorityQueues.PrioritizedItem<T> with which |
UpdatePriority(T, Int32)
Updates the priority of the provided item
, without changing the timestamp.
Declaration
PrioritizedItem<T> UpdatePriority(T item, int newPriority)
Parameters
Type | Name | Description |
---|---|---|
T | item | The item, to update the priority of. Must be present in the queue. |
System.Int32 | newPriority | The new priority to be assigned to |
Returns
Type | Description |
---|---|
MoreStructures.PriorityQueues.PrioritizedItem<T> | The MoreStructures.PriorityQueues.PrioritizedItem<T> with which |