Class PriorityQueue<T>
A priority queue.
Inheritance
System.Object
PriorityQueue<T>
Namespace: FM.LiveSwitch
Assembly: FM.LiveSwitch.dll
Syntax
public class PriorityQueue<T> : object
Type Parameters
Name | Description |
---|---|
T |
Constructors
PriorityQueue(Function2<T, T, CompareResult>)
Initializes a new instance of the PriorityQueue<T> class.
Declaration
public PriorityQueue(Function2<T, T, CompareResult> comparer)
Parameters
Type | Name | Description |
---|---|---|
Function2<T, T, CompareResult> | comparer | The comparer. |
Properties
Count
Gets the count.
Declaration
public int Count { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Methods
Dequeue()
Dequeues an item.
Declaration
public T Dequeue()
Returns
Type | Description |
---|---|
T |
Enqueue(T)
Enqueues an item.
Declaration
public void Enqueue(T item)
Parameters
Type | Name | Description |
---|---|---|
T | item | The item. |
Exists(T)
Checks if an item exists in the queue.
Declaration
public bool Exists(T item)
Parameters
Type | Name | Description |
---|---|---|
T | item | The item. |
Returns
Type | Description |
---|---|
System.Boolean |
IsConsistent()
Determines whether the queue is consistent.
Declaration
public bool IsConsistent()
Returns
Type | Description |
---|---|
System.Boolean |
Peek()
Declaration
public T Peek()
Returns
Type | Description |
---|---|
T |