FSharpx.Collections


RealTimeDeque<'T> Type

Constructors

Constructor Description

RealTimeDeque(c, frontLength, front, streamFront, rBackLength, rBack, streamRBack)

Full Usage: RealTimeDeque(c, frontLength, front, streamFront, rBackLength, rBack, streamRBack)

Parameters:
Returns: RealTimeDeque<'T>
c : int
frontLength : int
front : LazyList<'T>
streamFront : LazyList<'T>
rBackLength : int
rBack : LazyList<'T>
streamRBack : LazyList<'T>
Returns: RealTimeDeque<'T>

Instance members

Instance member Description

this.Cons(x)

Full Usage: this.Cons(x)

Parameters:
    x : 'T

Returns: RealTimeDeque<'T>

O(1), worst case. Returns a new deque with the element added to the beginning.

x : 'T
Returns: RealTimeDeque<'T>

this.Head

Full Usage: this.Head

Returns: 'T

O(1), worst case. Returns the first element.

Returns: 'T

this.Init

Full Usage: this.Init

Returns: RealTimeDeque<'T>

O(1), worst case. Returns a new deque of the elements before the last element.

Returns: RealTimeDeque<'T>

this.IsEmpty

Full Usage: this.IsEmpty

Returns: bool

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

Returns: bool

this.Last

Full Usage: this.Last

Returns: 'T

O(1), worst case. Returns the last element.

Returns: 'T

this.Length

Full Usage: this.Length

Returns: int

O(1). Returns the count of elements.

Returns: int

this.Lookup(i)

Full Usage: this.Lookup(i)

Parameters:
    i : int

Returns: 'T

O(n/2), worst case. Returns element by index.

i : int
Returns: 'T

this.Remove(i)

Full Usage: this.Remove(i)

Parameters:
    i : int

Returns: RealTimeDeque<'T>

O(n/2), worst case. Returns deque with element removed by index.

i : int
Returns: RealTimeDeque<'T>

this.Rev

Full Usage: this.Rev

Returns: RealTimeDeque<'T>

O(1). Returns deque reversed.

Returns: RealTimeDeque<'T>

this.Snoc(x)

Full Usage: this.Snoc(x)

Parameters:
    x : 'T

Returns: RealTimeDeque<'T>

O(1), worst case. Returns a new deque with the element added to the end.

x : 'T
Returns: RealTimeDeque<'T>

this.Tail

Full Usage: this.Tail

Returns: RealTimeDeque<'T>

O(1), worst case. Returns a new deque of the elements trailing the first element.

Returns: RealTimeDeque<'T>

this.TryGetHead

Full Usage: this.TryGetHead

Returns: 'T option

O(1), worst case. Returns option first element.

Returns: 'T option

this.TryGetInit

Full Usage: this.TryGetInit

Returns: RealTimeDeque<'T> option

O(1), worst case. Returns option deque of the elements before the last element.

Returns: RealTimeDeque<'T> option

this.TryGetLast

Full Usage: this.TryGetLast

Returns: 'T option

O(1), worst case. Returns option last element.

Returns: 'T option

this.TryGetTail

Full Usage: this.TryGetTail

Returns: RealTimeDeque<'T> option

O(1), worst case. Returns option deque of the elements trailing the first element.

Returns: RealTimeDeque<'T> option

this.TryLookup(i)

Full Usage: this.TryLookup(i)

Parameters:
    i : int

Returns: 'T option

O(n/2), worst case. Returns option element by index.

i : int
Returns: 'T option

this.TryRemove(i)

Full Usage: this.TryRemove(i)

Parameters:
    i : int

Returns: RealTimeDeque<'T> option

O(n/2), worst case. Returns option deque with element removed by index.

i : int
Returns: RealTimeDeque<'T> option

this.TryUncons

Full Usage: this.TryUncons

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

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

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

this.TryUnsnoc

Full Usage: this.TryUnsnoc

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

O(1), worst case. Returns option init and the last element.

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

this.TryUpdate(i) (y)

Full Usage: this.TryUpdate(i) (y)

Parameters:
    i : int
    y : 'T

Returns: RealTimeDeque<'T> option

O(n/2), worst case. Returns option deque with element updated by index.

i : int
y : 'T
Returns: RealTimeDeque<'T> option

this.Uncons

Full Usage: this.Uncons

Returns: 'T * RealTimeDeque<'T>

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

Returns: 'T * RealTimeDeque<'T>

this.Unsnoc

Full Usage: this.Unsnoc

Returns: RealTimeDeque<'T> * 'T

O(1), worst case. Returns init and the last element.

Returns: RealTimeDeque<'T> * 'T

this.Update(i) (y)

Full Usage: this.Update(i) (y)

Parameters:
    i : int
    y : 'T

Returns: RealTimeDeque<'T>

O(n/2), worst case. Returns deque with element updated by index.

i : int
y : 'T
Returns: RealTimeDeque<'T>