fsprojects/FSharpx.Collections


Array

Namespace: FSharpx.Collections

Extensions for F#'s Array module.

Functions and values

Function or valueDescription
catOptions xs
Signature: xs:Option<'a> [] -> '?10066 option [] -> '?10066 []
Type parameters: 'a, '?10066

The catOptions function takes a list of Options and returns an array of all the Some values.

centeredWindow n source
Signature: n:int -> source:'?10059 [] -> '?10059 [] []
Type parameters: '?10059

Returns an array of sliding windows of data drawn from the source array. Each window contains the n elements surrounding the current element.

centralMovingAverage n a
Signature: n:int -> a:^t [] -> ^t []
Type parameters: ^t

Calculates the central moving average for the array using n elements either side of the point where the mean is being calculated.

centralMovingAverageOfOption n a
Signature: n:int -> a:^t option array -> ^t option []
Type parameters: ^t

Calculates the central moving average for the array of optional elements using n elements either side of the point where the mean is being calculated. If any of the optional elements in the averaging window are None then the average itself is None.

choice1s xs
Signature: xs:Choice<'?10068,'?10069> [] -> '?10068 []
Type parameters: '?10068, '?10069

Extracts from an array of Choice all the Choice1Of2 elements. All the Choice1Of2 elements are extracted in order.

choice2s xs
Signature: xs:Choice<'?10071,'?10072> [] -> '?10072 []
Type parameters: '?10071, '?10072

Extracts from an array of Choice all the Choice2Of2 elements. All the Choice2Of2 elements are extracted in order.

copyTo (...)
Signature: sourceStartIndx:int -> startIndx:int -> source:'?10053 [] -> target:'?10053 [] -> unit
Type parameters: '?10053
equalsWith eq xs ys
Signature: eq:('?10077 -> '?10077 -> bool) -> xs:'?10077 [] -> ys:'?10077 [] -> bool
Type parameters: '?10077

Compares two arrays for equality using the given comparison function, element by element.

nth i arr
Signature: i:int -> arr:'?10049 [] -> '?10049
Type parameters: '?10049
ofTuple source
Signature: source:obj -> obj array
partitionChoices xs
Signature: xs:Choice<'?10074,'?10075> [] -> '?10074 [] * '?10075 []
Type parameters: '?10074, '?10075

Partitions an aray of Choice into two arrays. All the Choice1Of2 elements are extracted, in order, to the first component of the output. Similarly the Choice2Of2 elements are extracted to the second component of the output.

setAt i v arr
Signature: i:int -> v:'?10051 -> arr:'?10051 [] -> '?10051 []
Type parameters: '?10051
toTuple source
Signature: source:'T array -> 't
Type parameters: 'T, 't
Fork me on GitHub