FSharpx.Collections


BlockResizeArray<'T> Type

Resize array fith fixed size block memory allocation. Provide more optimal space usage for huge arrays than standard ResizeArray. Basic version created by Avdyukhin Dmitry (dimonbv@gmail.com) As evidenced by the tests that cannot run in mono, and pending destabilizing tests, beware that this data structure can be destabilizing to your assembly.

Constructors

Constructor Description

BlockResizeArray()

Full Usage: BlockResizeArray()

Returns: BlockResizeArray<'T>
Returns: BlockResizeArray<'T>

Instance members

Instance member Description

this.Add(x)

Full Usage: this.Add(x)

Parameters:
    x : 'T

Adds element to the block resize array.

x : 'T

this.DeleteBlock(i)

Full Usage: this.DeleteBlock(i)

Parameters:
    i : int

Deletes block given index.

i : int

this.Filter(f)

Full Usage: this.Filter(f)

Parameters:
    f : 'T -> bool

Returns: BlockResizeArray<'T>

Returns a new collection containing only the elements of the collection for which the given predicate returns true.

f : 'T -> bool
Returns: BlockResizeArray<'T>

this.Find(f)

Full Usage: this.Find(f)

Parameters:
    f : 'T -> bool

Returns: 'T

Returns the first element for which the given function returns true. Raise KeyNotFoundException if no such element exists.

f : 'T -> bool
Returns: 'T

this.Fold(folder) (state)

Full Usage: this.Fold(folder) (state)

Parameters:
    folder : 'State -> 'T -> 'State
    state : 'State

Returns: 'State

Applies a function to each element of the collection, threading an accumulator argument through the computation.

folder : 'State -> 'T -> 'State
state : 'State
Returns: 'State

this.[i]

Full Usage: this.[i]

Returns: int

Allows to get-set element to block resize array.

Returns: int

this.Iter(f)

Full Usage: this.Iter(f)

Parameters:
    f : 'T -> unit

Applies the given function to each element of the block resize array.

f : 'T -> unit

this.Length

Full Usage: this.Length

Returns: int

Returns the length of a block resize array.

Returns: int

this.Map(f)

Full Usage: this.Map(f)

Parameters:
    f : 'T -> 'U

Returns: BlockResizeArray<'U>

Builds a new block resize array whose elements are the results of applying the given function to each of the elements of the array.

f : 'T -> 'U
Returns: BlockResizeArray<'U>

this.Shift

Full Usage: this.Shift

Returns: int

Returns the shift size for block resize array.

Returns: int

this.ToArray()

Full Usage: this.ToArray()

Returns: 'T[]

Creates an array from the given block resize array.

Returns: 'T[]

this.TryFind(f)

Full Usage: this.TryFind(f)

Parameters:
    f : 'T -> bool

Returns: 'T option

Returns the first element for which the given function returns true. Return None if no such element exists.

f : 'T -> bool
Returns: 'T option

Static members

Static member Description

BlockResizeArray.Init(initCount) (f)

Full Usage: BlockResizeArray.Init(initCount) (f)

Parameters:
    initCount : int
    f : int -> 'T

Returns: BlockResizeArray<'T>

Creates a block resize array given the dimension and a generator function to compute the elements.

initCount : int
f : int -> 'T
Returns: BlockResizeArray<'T>

BlockResizeArray.ZeroCreate(initCount)

Full Usage: BlockResizeArray.ZeroCreate(initCount)

Parameters:
    initCount : int

Returns: BlockResizeArray<'a>

Creates a block resize array where the entries are initially the default value Unchecked.defaultof<'T>.

initCount : int
Returns: BlockResizeArray<'a>