FSharpAux


JaggedArray

Namespace: FSharpAux
Attributes:
[<AutoOpen>]

Functions and values

Function or valueDescription
fold(...)
Signature: innerFolder:('State1 -> 'T -> 'State1) -> outerFolder:('State2 -> 'State1 -> 'State2) -> innerState:'State1 -> outerState:'State2 -> jArray:'T [] [] -> 'State2
Type parameters: 'State1, 'T, 'State2

Applies a function to each element of the inner arrays of the jagged array, threading an accumulator argument through the computation. A second function is the applied to each result of the predeceding computation, again passing an accumulater through the computation

innerChoose chooser jArray
Signature: chooser:('T -> 'U option) -> jArray:'T [] [] -> 'U [] []
Type parameters: 'T, 'U

Applies the given function to each element in the inner arrays of the jagged array. Returns the jagged array whose inner arrays are comprised of the results x for each element where the function returns Some(x)

innerFilter predicate jArray
Signature: predicate:('T -> bool) -> jArray:'T [] [] -> 'T [] []
Type parameters: 'T

Returns a new jagged array whose inner arrays only contain the elements for which the given predicate returns true

innerFold folder state jArray
Signature: folder:('State -> 'T -> 'State) -> state:'State -> jArray:'T [] [] -> 'State []
Type parameters: 'State, 'T

Applies a function to each element of the inner arrays of the jagged array, threading an accumulator argument through the computation.

map mapping jArray
Signature: mapping:('T -> 'U) -> jArray:'T [] [] -> 'U [] []
Type parameters: 'T, 'U

Builds a new jagged array whose inner arrays are the results of applying the given function to each of their elements.

map2 mapping jArray1 jArray2
Signature: mapping:('T1 -> 'T2 -> 'U) -> jArray1:'T1 [] [] -> jArray2:'T2 [] [] -> 'U [] []
Type parameters: 'T1, 'T2, 'U

Builds a new jagged array whose inner arrays are the results of applying the given function to the corresponding elements of the inner arrays of the two jagged arrays pairwise. All corresponding inner arrays must be of the same length, otherwise ArgumentException is raised.

map3 mapping jArray1 jArray2 jArray3
Signature: mapping:('T1 -> 'T2 -> 'T3 -> 'U) -> jArray1:'T1 [] [] -> jArray2:'T2 [] [] -> jArray3:'T3 [] [] -> 'U [] []
Type parameters: 'T1, 'T2, 'T3, 'U

Builds a new jagged array whose inner arrays are the results of applying the given function to the corresponding elements of the inner arrays of the tree jagged arrays triplewise. All corresponding inner arrays must be of the same length, otherwise ArgumentException is raised.

mapi mapping jArray
Signature: mapping:(int -> 'T -> 'U) -> jArray:'T [] [] -> 'U [] []
Type parameters: 'T, 'U

Builds a new jagged array whose inner arrays are the results of applying the given function to each of their elements. The integer index passed to the function indicates the index of element in the inner array being transformed.

ofJaggedList(data)
Signature: data:'T list list -> 'T [] []
Type parameters: 'T

Converts a jagged list into a jagged array

ofJaggedSeq(data)
Signature: data:seq<'?8720> -> 'T [] []
Type parameters: '?8720, 'T

Converts a jagged Seq into a jagged array

shuffle(arr)
Signature: arr:'T [] [] -> 'T [] []
Type parameters: 'T

Shuffels a jagged array (method: Fisher-Yates)

shuffleColumnWise(arr)
Signature: arr:'T [] [] -> 'T [] []
Type parameters: 'T

Shuffles each column of a jagged array separately (method: Fisher-Yates)

shuffleRowWise(arr)
Signature: arr:'T [] [] -> 'T [] []
Type parameters: 'T

Shuffles each row of a jagged array separately (method: Fisher-Yates)

toJaggedList(arr)
Signature: arr:'T [] [] -> 'T list list
Type parameters: 'T

Converts a jagged array into a jagged list

toJaggedSeq(arr)
Signature: arr:'T [] [] -> seq<seq<'T>>
Type parameters: 'T

Converts a jagged array into a jagged seq

transpose(arr)
Signature: arr:'T [] [] -> 'T [] []
Type parameters: 'T

Transposes a jagged array

Fork me on GitHub