class · System
PriorityQueue<E, P>
public class System.PriorityQueue<E, P> : System.Any
Elements with priorities; Dequeue gives one with the smallest priority (among equals, in no set order).
- Kind
- class
- Namespace
- System
- Assembly
- System.Core
- Access
- public
- Source file
PriorityQueue.ant
Type parameters
| Name | Constraints |
|---|---|
E | any type |
P | System.IComparable<P> |
Inheritance
- Base classes
-
AnyPriorityQueue<E, P>
Constructors
Properties
Methods
method Enqueue(element: E, priority: P) -> void
#
method Dequeue() -> E
#
The element with the smallest priority, taken out.
method Peek() -> E
#
The element with the smallest priority, and that priority (left in).
method EnqueueDequeue(element: E, priority: P) -> E
#
Enqueue then Dequeue, in one step (the new element comes straight back when it is the smallest).
method Clear() -> void
#
Private and internal members (7)
Inherited members (5)
GetTypemethod from AnyUndescribedmethod from AnyToStringmethod from AnyHashmethod from Anydestroymethod from Any
Source
PriorityQueue<E, P> as Larva HIR, decompiled from its Larva HIR.
// Elements with priorities; Dequeue gives one with the smallest priority (among equals, in no set order).
public class System.PriorityQueue<E, P> : System.Any
{
field elements: E[]
field priorities: P[]
field count: i32
method Grow() -> void
static method Empty() -> void
// Moves the entry at `at` (element, priority) up past larger parents.
method Up(at: i32, element: E, priority: P) -> void
// Puts (element, priority) at `at` and moves it down past smaller children.
method Down(at: i32, element: E, priority: P) -> void
constructor PriorityQueue()
constructor PriorityQueue(capacity: i32)
method Enqueue(element: E, priority: P) -> void
// The element with the smallest priority, taken out.
method Dequeue() -> E
// The element with the smallest priority, and that priority (left in).
method Peek() -> E
// Enqueue then Dequeue, in one step (the new element comes straight back when it is the smallest).
method EnqueueDequeue(element: E, priority: P) -> E
method Clear() -> void
property Count: i32
property IsEmpty: bool
property PeekPriority: P
}