Class PriorityQueue<P, V>
A priority queue.
Inheritance
System.Object
PriorityQueue<P, V>
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace:numl.AI.Collections
Assembly:numl.dll
Syntax
public class PriorityQueue<P, V>
Type Parameters
| Name | Description |
|---|---|
| P | Key type. |
| V | Value type. |
Properties
View SourceCount
Gets the count.
Declaration
public int Count { get; }
Property Value
| Type | Description |
|---|---|
| System.Int32 | The count. |
IsEmpty
Gets a value indicating whether this instance is empty.
Declaration
public bool IsEmpty { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
|
Methods
View SourceDequeue()
Dequeues this instance.
Declaration
public V Dequeue()
Returns
| Type | Description |
|---|---|
| V | V. |
Enqueue(P, V)
Enqueues the specified priority.
Declaration
public void Enqueue(P priority, V value)
Parameters
| Type | Name | Description |
|---|---|---|
| P | priority | The priority. |
| V | value | The value. |