Click or drag to resize

PriorityQueueTSetPriority Method

Sets the priority of the item at the given index.

Namespace: GSF.Collections
Assembly: GSF.Core (in GSF.Core.dll) Version: 2.4.242-beta+5de70bd1c87865d409ebc16b8886196644c0c750
Syntax
public void SetPriority(
	int index,
	int priority
)
View Source

Parameters

index  Int32
The index of the item.
priority  Int32
The new priority of the item.
Exceptions
ExceptionCondition
ArgumentOutOfRangeExceptionIndex does not fall within the bounds of the queue.
Remarks
This method can be used to change the priority of the item at the given index. After setting the priority, the queue will have to fix the heap so this is an O(log n) operation.
See Also