Import std.collections.priority_queue
std.collections.priority_queue
PriorityQueue<T>: Pop gives the value that comes first, the smallest unless a before function
says what comes first. The values are a binary heap: each one comes before its two children,
at 2i + 1 and 2i + 2. In the smallest-first order, a value that isn't equal to itself, like
NaN, panics where it's added, as with SortedSet, since the order can't place it.
std/collections/priority_queue.fb
Types
PriorityQueue
class
@DebugElements Public Class PriorityQueue<T> Implements Iterable<T>, Cloneable
A heap that gives its values out first by a priority: the smallest first, or what a Function says comes first.
std/collections/priority_queue.fb, line 11
-
A new, empty PriorityQueue that gives its smallest value first.
-
A new, empty PriorityQueue that gives first the value
beforesays comes before the others. -
How many values it holds.
-
Puts
valuein. -
Adds each of the
values, putting the heap in order once, in time that grows with the count. -
Takes the first value off and gives it. Panics when the PriorityQueue is empty.
-
Takes the first value off and gives it, or Null when the PriorityQueue is empty.
-
The first value, which stays, or Null when the PriorityQueue is empty.
-
Takes every value off, and gives them in the order Pop would.
-
The values, in no particular order, in a new array.
-
The first value, which stays. Panics when the PriorityQueue is empty.
-
Whether it holds
value. -
Takes every value out.
-
A new PriorityQueue with the same values and order.
-
The values, in no particular order: Pop gives them in order. Changing the PriorityQueue while going over them panics.
PriorityQueueIterator
struct
Public Struct PriorityQueueIterator<T> Implements Iterator<T>
The values of a PriorityQueue, in no order to count on, which For ... In goes over.
std/collections/priority_queue.fb, line 179
-
The next value, or Null when there are no more.
Doc from
std.core.iterator.Iterator.Next.
Extends
PriorityQueue
extend
Extend PriorityQueue<T> Implements Defaultable
No doc comment.
std/collections/priority_queue.fb, line 172
-
The value to start from, like 0 for a number, "" for a String, or an empty collection.
Report an issue with this page or with FutureBlitz on GitHub.