MutPriorityQueue

0.40.0

Definitions

def dequeue [ar] ( pq : MutPriorityQueue[a, r] ) : Option[a] \ r with Order[a]

Source

Removes and optionally returns the top element of pq.

def enqueue [ar] ( pq : MutPriorityQueue[a, r] x : a ) : Unit \ r with Order[a]

Source

Enqueues an element x into a pq.

def enqueueAll [arm] ( pq : MutPriorityQueue[a, r] m : m[a] ) : Unit \ r with Order[a] Iterable[m]

Source

Enqueues each element in l into pq.

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

Source

Returns whether pq is empty.

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

Source

Returns an iterator over pq.

Modifying pq during iteration is undefined and not recommended.

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

Source

Returns an empty MutPriorityQueue.

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

Source

Optionally returns the top element of pq.

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

Source

Returns the number of elements in pq.

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

Source

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 [ar] ( pq : MutPriorityQueue[a, r] ) : List[a] \ r with Order[a]

Source

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 [ar] ( pq : MutPriorityQueue[a, r] ) : Option[Nel[a]] \ r with Order[a]

Source

Optionally returns a Nel representation of pq.

def toString [ar] ( pq : MutPriorityQueue[a, r] ) : String \ r with ToString[a]

Source

Returns a String representation of the mutable priority queue pq.