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).
- Tipo
- class
- Espacio de nombres
- System
- Ensamblado
- System.Core
- Acceso
- public
- Archivo fuente
PriorityQueue.ant
Parámetros de tipo
| Nombre | Restricciones |
|---|---|
E | cualquier tipo |
P | System.IComparable<P> |
Herencia
- Clases base
-
AnyPriorityQueue<E, P>
Constructores
Propiedades
Métodos
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
#
Miembros privados e internos (7)
Miembros heredados (5)
GetTypemétodo de AnyUndescribedmétodo de AnyToStringmétodo de AnyHashmétodo de Anydestroymétodo de Any
Código fuente
PriorityQueue<E, P> en Larva HIR, descompilado a partir de su 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
}