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.253-beta+ffb7163c9e3b771705bc5b9aa3f09870f2cb9e2c
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