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.207-beta+1781b796b2aa7a54013a031eb432fe4ccee31867
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