PriorityQueue<T> Class
Namespace: Stride.Core.CollectionsAssembly: Stride.Core.dll
Represents a sorted queue, with logarithmic time insertion and deletion.
                 System.Object →  
                PriorityQueue<T>
              
              
                 Derived from PriorityQueue<T>: 
              
              
              
public class PriorityQueue<T>
              Type Parameters
| Name | Description | 
|---|---|
| T | The type of the elements in the queue.  | 
                  
| Name | Description | |
|---|---|---|
| Constructors | ||
| PriorityQueue() | ||
| PriorityQueue(IComparer<T>) | ||
| Properties | ||
| Count | ||
| Empty | ||
| Methods | ||
| Clear() | ||
| Dequeue() | Removes and returns the object at the beginning of the PriorityQueue<T>.  | 
                          |
| Enqueue(T) | Adds an object to the PriorityQueue<T> and sorts underlying container.  | 
                          |
| Peek() | Returns the object at the beginning of the PriorityQueue<T>, without removing it.  | 
                          |
| Remove(T) | ||
Constructors
PriorityQueue()
public PriorityQueue()
              PriorityQueue(IComparer<T>)
public PriorityQueue(IComparer<T> comparer)
              Parameters
| Type | Name | Description | 
|---|---|---|
| System.Collections.Generic.IComparer<T> | comparer | 
Properties
Count
public int Count { get; }
              Property Value
| Type | Description | 
|---|---|
| System.Int32 | 
Empty
public bool Empty { get; }
              Property Value
| Type | Description | 
|---|---|
| System.Boolean | 
Methods
Clear()
public void Clear()
              Dequeue()
Removes and returns the object at the beginning of the PriorityQueue<T>.
public T Dequeue()
              Returns
| Type | Description | 
|---|---|
| T | The object at the beginning of the PriorityQueue<T>.  | 
                  
Enqueue(T)
Adds an object to the PriorityQueue<T> and sorts underlying container.
public void Enqueue(T item)
              Parameters
| Type | Name | Description | 
|---|---|---|
| T | item | The object to add to the queue.  | 
                  
Peek()
Returns the object at the beginning of the PriorityQueue<T>, without removing it.
public T Peek()
              Returns
| Type | Description | 
|---|---|
| T | The object at the beginning of the PriorityQueue<T>.  | 
                  
Remove(T)
public void Remove(T item)
              Parameters
| Type | Name | Description | 
|---|---|---|
| T | item |