Array Module

Contains extensions to the F# Array module.

Functions and values

Function or value Description

allClose relativeTolerance absoluteTolerance array1 array2

Full Usage: allClose relativeTolerance absoluteTolerance array1 array2

Parameters:
    relativeTolerance : ^T
    absoluteTolerance : ^T
    array1 : ^T[]
    array2 : ^T[]

Returns: bool
Modifiers: inline
Type parameters: ^T, ^a, ^b (requires (static member op_Subtraction : ^T * ^T -> ^a) and (static member op_Addition : ^T * ^b -> ^a) and (static member op_Multiply : ^T * ^T -> ^b) and (static member Abs : ^T -> ^T) and (static member Abs : ^a -> ^a) and comparison and (static member op_Addition : ^T * ^b -> ^a))

Determines if all values of the first array lie within the given tolerances of the second array.

relativeTolerance : ^T
absoluteTolerance : ^T
array1 : ^T[]
array2 : ^T[]
Returns: bool

cumulativeSum a

Full Usage: cumulativeSum a

Parameters:
    a : ^a[]

Returns: ^b array
Modifiers: inline
Type parameters: ^a, ^b (requires (static member op_Addition : ^b * ^a -> ^b) and (static member get_Zero : -> ^b) and (static member op_Addition : ^b * ^a -> ^b))

Gets the cumulative sum of the input array.

a : ^a[]
Returns: ^b array

foralli f arr

Full Usage: foralli f arr

Parameters:
    f : int -> 'T -> bool
    arr : 'T[]

Returns: bool
Type parameters: 'T
f : int -> 'T -> bool
arr : 'T[]
Returns: bool

getUniqueCounts sorted values

Full Usage: getUniqueCounts sorted values

Parameters:
    sorted : bool
    values : 'T[]

Returns: 'T array * int array
Type parameters: 'T (requires equality)

Gets the unique counts of the input array.

sorted : bool
values : 'T[]
Returns: 'T array * int array

initFlat2D i j f

Full Usage: initFlat2D i j f

Parameters:
    i : int
    j : int
    f : int -> int -> 'a

Returns: 'a array
Type parameters: 'a
i : int
j : int
f : int -> int -> 'a
Returns: 'a array

initFlat3D i j k f

Full Usage: initFlat3D i j k f

Parameters:
    i : int
    j : int
    k : int
    f : int -> int -> int -> 'a

Returns: 'a array
Type parameters: 'a
i : int
j : int
k : int
f : int -> int -> int -> 'a
Returns: 'a array

insertManyAt index values source

Full Usage: insertManyAt index values source

Parameters:
    index : int
    values : 'T seq
    source : 'T[]

Returns: 'T[]
Type parameters: 'T
index : int
values : 'T seq
source : 'T[]
Returns: 'T[]

removeAt index source

Full Usage: removeAt index source

Parameters:
    index : int
    source : 'T[]

Returns: 'T[]
Type parameters: 'T
index : int
source : 'T[]
Returns: 'T[]

© Copyright 2021, DiffSharp and dfx Contributors.