Click or drag to resize

ConcurrentPriorityQueueTKey, TValue Class

Implements a heap based priority queue that hold only keys. The key with the minimum value can then retrieved from the queue. This class is not thread safe.
Inheritance Hierarchy
SystemObject
  Altaxo.CollectionsConcurrentPriorityQueueTKey, TValue

Namespace: Altaxo.Collections
Assembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax
C#
public class ConcurrentPriorityQueue<TKey, TValue>
where TKey : Object, IComparable<TKey>

Type Parameters

TKey
The type of the key.
TValue
The type of the value.

The ConcurrentPriorityQueueTKey, TValue type exposes the following members.

Constructors
 NameDescription
Public methodConcurrentPriorityQueueTKey, TValue Initializes a new instance of the ConcurrentPriorityQueueTKey, TValue class.
Public methodConcurrentPriorityQueueTKey, TValue(Int32) Initializes a new instance of the ConcurrentPriorityQueueTKey, TValue class with a specified initial capacity.
Top
Properties
 NameDescription
Public propertyCount Gets the number of elements in the queue.
Public propertyIsEmpty Gets a value indicating whether the queue is empty.
Top
Methods
 NameDescription
Public methodEnqueue Adds the specified key to the queue.
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Public methodTryDequeue Dequeues the minimum key value. An exception is thrown if the queue is empty.
Public methodTryDequeueIf(FuncTKey, Boolean, TKey, TValue) Dequeues the minimum key value. Two conditions are neccessary in order to dequeue an item: i) at least one item needs to be in the queue, and ii) the predicate given in the argument, applied to the minimum key value item, must return true.
Public methodTryDequeueIf(FuncTKey, TValue, Boolean, TKey, TValue) Dequeues the minimum key value. Two conditions are neccessary in order to dequeue an item: i) at least one item needs to be in the queue, and ii) the predicate given in the argument, applied to the minimum key value item, must return true.
Public methodTryPeek Peeks the element with the minimum key value. An exception is thrown if the queue is empty.
Top
See Also