MutQueue

Definitions

def dequeue(mq: MutQueue[a, r]): Option[a] \ r with Order[a] Source

Removes and optionally returns the top element of mq.

def empty(rc: Region[r]): MutQueue[a, r] \ r Source

Returns an empty MutQueue.

def enqueue(mq: MutQueue[a, r], x: a): Unit \ r with Order[a] Source

Enqueues an element x into a mq.

def enqueueAll(mq: MutQueue[elt, r], m: m): Unit \ r + Aef[m] with Iterable[m], Order[elt] where Iterable.Elm[m] ~ elt Source

Enqueues each element in m into mq.

def isEmpty(mq: MutQueue[a, r]): Bool \ r Source

Returns whether mq is empty.

def iterator(rc: Region[r1], mq: MutQueue[a, r2]): Iterator[a, r1 + r2, r1] \ r1 + r2 Source

Returns an iterator over mq.

Modifying mq during iteration is undefined and not recommended.

def nonEmpty(mq: MutQueue[a, r]): Bool \ r Source

Returns whether mq is non-empty.

def peek(mq: MutQueue[a, r]): Option[a] \ r Source

Optionally returns the top element of mq.

def size(mq: MutQueue[a, r]): Int32 \ r Source

Returns the number of elements in mq.

def toArray(rc: Region[r1], mq: MutQueue[a, r2]): Array[a, r1] \ r1 + r2 Source

Returns an Array representation of mq.

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

def toList(mq: MutQueue[a, r]): List[a] \ r with Order[a] Source

Returns a List representation of mq.

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

def toNel(mq: MutQueue[a, r]): Option[Nel[a]] \ r with Order[a] Source

Optionally returns a Nel representation of mq.

def toString(mq: MutQueue[a, r]): String \ r with ToString[a] Source

Returns a String representation of the mutable priority queue mq.

def toVector(mq: MutQueue[a, r]): Vector[a] \ r Source

Returns an Vector representation of mq.

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