FSharpx.Collections


PhysicistQueue<'T> Type

Constructors

Constructor Description

PhysicistQueue(prefix, frontLength, front, rBackLength, rBack)

Full Usage: PhysicistQueue(prefix, frontLength, front, rBackLength, rBack)

Parameters:
    prefix : 'T list
    frontLength : int
    front : Lazy<'T list>
    rBackLength : int
    rBack : 'T list

Returns: PhysicistQueue<'T>
prefix : 'T list
frontLength : int
front : Lazy<'T list>
rBackLength : int
rBack : 'T list
Returns: PhysicistQueue<'T>

Instance members

Instance member Description

this.Head

Full Usage: this.Head

Returns: 'T

O(1), amortized. Returns the first element.

Returns: 'T

this.IsEmpty

Full Usage: this.IsEmpty

Returns: bool

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

Returns: bool

this.Length

Full Usage: this.Length

Returns: int

O(1). Returns the count of elements.

Returns: int

this.Rev

Full Usage: this.Rev

Returns: PhysicistQueue<'T>

O(1). Returns queue reversed.

Returns: PhysicistQueue<'T>

this.Snoc(x)

Full Usage: this.Snoc(x)

Parameters:
    x : 'T

Returns: PhysicistQueue<'T>

O(1), amortized. Returns a new queue with the element added to the end.

x : 'T
Returns: PhysicistQueue<'T>

this.Tail

Full Usage: this.Tail

Returns: PhysicistQueue<'T>

O(1), amortized. Returns a new queue of the elements trailing the first element.

Returns: PhysicistQueue<'T>

this.TryGetHead

Full Usage: this.TryGetHead

Returns: 'T option

O(1), amortized. Returns option first element.

Returns: 'T option

this.TryGetTail

Full Usage: this.TryGetTail

Returns: PhysicistQueue<'T> option

O(1), amortized. Returns option queue of the elements trailing the first element.

Returns: PhysicistQueue<'T> option

this.TryUncons

Full Usage: this.TryUncons

Returns: ('T * PhysicistQueue<'T>) option

O(1), amortized. Returns option first element and tail.

Returns: ('T * PhysicistQueue<'T>) option

this.Uncons

Full Usage: this.Uncons

Returns: 'T * PhysicistQueue<'T>

O(1), amortized. Returns the first element and tail.

Returns: 'T * PhysicistQueue<'T>