FSharpx.Collections


PriorityQueue Module

Functions and values

Function or value Description

PriorityQueue.empty isDescending

Full Usage: PriorityQueue.empty isDescending

Parameters:
    isDescending : bool

Returns: IPriorityQueue<'T>

O(1). Returns a empty queue, with indicated ordering.

isDescending : bool
Returns: IPriorityQueue<'T>

PriorityQueue.insert element pq

Full Usage: PriorityQueue.insert element pq

Parameters:
Returns: IPriorityQueue<'T>

O(log n) amortized time. Returns a new queue with the element added to the end.

element : 'T
pq : IPriorityQueue<'T>
Returns: IPriorityQueue<'T>

PriorityQueue.isEmpty pq

Full Usage: PriorityQueue.isEmpty pq

Parameters:
Returns: bool

O(1). Returns true if the queue has no elements.

pq : IPriorityQueue<'T>
Returns: bool

PriorityQueue.peek pq

Full Usage: PriorityQueue.peek pq

Parameters:
Returns: 'T

O(1). Returns the first element.

pq : IPriorityQueue<'T>
Returns: 'T

PriorityQueue.pop pq

Full Usage: PriorityQueue.pop pq

Parameters:
Returns: 'T * IPriorityQueue<'T>

O(log n) amortized time. Returns the first element and tail.

pq : IPriorityQueue<'T>
Returns: 'T * IPriorityQueue<'T>

PriorityQueue.tryPeek pq

Full Usage: PriorityQueue.tryPeek pq

Parameters:
Returns: 'T option

O(1). Returns option first element.

pq : IPriorityQueue<'T>
Returns: 'T option

PriorityQueue.tryPop pq

Full Usage: PriorityQueue.tryPop pq

Parameters:
Returns: ('T * IPriorityQueue<'T>) option

O(log n) amortized time. Returns the option first element and tail.

pq : IPriorityQueue<'T>
Returns: ('T * IPriorityQueue<'T>) option