Click or drag to resize

PriorityQueueTAdjustPriority Method

Adds the given value to the priority of all values in the priority queue.

Namespace: GSF.Collections
Assembly: GSF.Core (in GSF.Core.dll) Version: 2.4.300-beta+b2186e2cd1f968c931b0e151fdd7c839f3d1e9cf
Syntax
public void AdjustPriority(
	int delta
)
View Source

Parameters

delta  Int32
The amount by which to adjust priorities.
Remarks
This allows for adjusting the priorities of all items in the heap without having to fix the heap each time a priority is changed. This can be useful to increase the priorities of items that have been in the queue for significant periods of time to prevent starvation. This is an O(n) operation.
See Also