MutPriorityQueue

Definitions

def dequeue(pq: MutPriorityQueue[a, r]): Option[a] \ rSource

Removes and optionally returns the top element of pq.

def enqueue(pq: MutPriorityQueue[a, r], x: a): Unit \ rSource

Enqueues an element x into a pq.

def enqueueAll(pq: MutPriorityQueue[a, r], m: m[a]): Unit \ rSource

Enqueues each element in l into pq.

def isEmpty(pq: MutPriorityQueue[a, r]): Bool \ rSource

Returns whether pq is empty.

def iterator(rc: Region[r1], pq: MutPriorityQueue[a, r2]): Iterator[a, r1 + r2, r1] \ r1 + r2Source

Returns an iterator over pq.

Modifying pq during iteration is undefined and not recommended.

def new(rc: Region[r]): MutPriorityQueue[a, r] \ rSource

Returns an empty MutPriorityQueue.

def peek(pq: MutPriorityQueue[a, r]): Option[a] \ rSource

Optionally returns the top element of pq.

def size(pq: MutPriorityQueue[a, r]): Int32 \ rSource

Returns the number of elements in pq.

def toArray(rc: Region[r1], pq: MutPriorityQueue[a, r2]): Array[a, r1] \ r1 + r2Source

Returns an Array representation of pq.

Note that a MutPriorityQueue's element order depends on the order in which the elements were enqueued.

def toList(pq: MutPriorityQueue[a, r]): List[a] \ rSource

Returns a List representation of pq.

Note that a MutPriorityQueue's element order depends on the order in which the elements were enqueued.

def toNel(pq: MutPriorityQueue[a, r]): Option[Nel[a]] \ rSource

Optionally returns a Nel representation of pq.

def toString(pq: MutPriorityQueue[a, r]): String \ rSource

Returns a String representation of the mutable priority queue pq.