FSharpx.Collections


RingBuffer<'T> Type

Constructors

Constructor Description

RingBuffer(values)

Full Usage: RingBuffer(values)

Parameters:
    values : seq<'T>

Returns: RingBuffer<'T>
values : seq<'T>
Returns: RingBuffer<'T>

RingBuffer(size)

Full Usage: RingBuffer(size)

Parameters:
    size : int

Returns: RingBuffer<'T>
size : int
Returns: RingBuffer<'T>

RingBuffer(position, values)

Full Usage: RingBuffer(position, values)

Parameters:
    position : int
    values : seq<'T>

Returns: RingBuffer<'T>
position : int
values : seq<'T>
Returns: RingBuffer<'T>

Instance members

Instance member Description

this.Advance(offset)

Full Usage: this.Advance(offset)

Parameters:
    offset : int

Returns: int

Advances the position of the RingBuffer by the offset. Returns the position of the RingBuffer. Throws an ArgumentException if the offset is negative.

offset : int
Returns: int

this.Buffer

Full Usage: this.Buffer

Returns: 'T[]
Returns: 'T[]

this.Clone()

Full Usage: this.Clone()

Returns: RingBuffer<'T>
Returns: RingBuffer<'T>

this.Insert(offset, items)

Full Usage: this.Insert(offset, items)

Parameters:
    offset : int
    items : seq<'T>

offset : int
items : seq<'T>

this.Insert(op, offset, items)

Full Usage: this.Insert(op, offset, items)

Parameters:
    op : 'T -> 'b -> 'T
    offset : int
    items : seq<'b>

op : 'T -> 'b -> 'T
offset : int
items : seq<'b>

this.Normalize()

Full Usage: this.Normalize()

this.Position

Full Usage: this.Position

this.ToArray()

Full Usage: this.ToArray()

Returns: 'T[]
Returns: 'T[]

this.TryAdvance(offset)

Full Usage: this.TryAdvance(offset)

Parameters:
    offset : int

Returns: int option

Tries to advance the position of the RingBuffer by the offset. Returns None if offset is negative, otherwise Some containing the position of the RingBuffer.

offset : int
Returns: int option