fsprojects/FSharpx.Collections


BlockResizeArray<'T>

Namespace: FSharpx.Collections.Experimental

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

Constructors

ConstructorDescription
new()
Signature: unit -> BlockResizeArray<'T>

CompiledName: .ctor

Instance members

Instance memberDescription
Add(x)
Signature: x:'T -> unit

Adds element to the block resize array.

DeleteBlock(i)
Signature: i:int -> unit

Deletes block given index.

Filter(f)
Signature: (f:('T -> bool)) -> BlockResizeArray<'T>

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

Find(f)
Signature: (f:('T -> bool)) -> 'T

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

Fold(folder state)
Signature: (folder:('State -> 'T -> 'State)) -> state:'State -> 'State

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

[i]
Signature: i:int -> 'T

Allaws to get-set element to block resize array.

CompiledName: set_Item

[()]
Signature: unit -> int

Allaws to get-set element to block resize array.

CompiledName: get_Item

Iter(f)
Signature: (f:('T -> unit)) -> unit

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

Length
Signature: int

Returns the length of a block resize array.

CompiledName: get_Length

Map(f)
Signature: (f:('T -> 'U)) -> 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.

Shift
Signature: int

Returns the shift size for block resize array.

CompiledName: get_Shift

ToArray()
Signature: unit -> 'T []

Creates an array from the given block resize array.

TryFind(f)
Signature: (f:('T -> bool)) -> 'T option

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

Static members

Static memberDescription
Init(initCount f)
Signature: initCount:int -> (f:(int -> 'T)) -> BlockResizeArray<'T>

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

ZeroCreate(initCount)
Signature: initCount:int -> BlockResizeArray<'?10285>

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

Fork me on GitHub