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.245-beta+94213ae9d4d0aa7a2c48e5398b12d267b99f868a
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