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.218-beta+101eee949414e414795e55a6e73d88938f0177b8
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