Header menu logo FSharp.Stats

JaggedArray Module

Functions and values

Function or value Description

copy arr

Full Usage: copy arr

Parameters:
    arr : 'a[][] -

Returns: 'a array array

Copies the jagged array

arr : 'a[][]

Returns: 'a array array

Example

fold innerFolder outerFolder innerState outerState jArray

Full Usage: fold innerFolder outerFolder innerState outerState jArray

Parameters:
    innerFolder : 'State1 -> 'T -> 'State1
    outerFolder : 'State2 -> 'State1 -> 'State2
    innerState : 'State1
    outerState : 'State2
    jArray : 'T[][]

Returns: '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 
 
 
 
 
 
 
 
innerFolder : 'State1 -> 'T -> 'State1
outerFolder : 'State2 -> 'State1 -> 'State2
innerState : 'State1
outerState : 'State2
jArray : 'T[][]
Returns: 'State2

init rowN colN f

Full Usage: init rowN colN f

Parameters:
    rowN : int -
    colN : int -
    f : int -> int -> 'a -

Returns: 'a array array

Creates an jagged array with the given dimensions and a generator function to compute the elements

rowN : int

colN : int

f : int -> int -> 'a

Returns: 'a array array

Example

innerChoose chooser jArray

Full Usage: innerChoose chooser jArray

Parameters:
    chooser : 'T -> 'U option -
    jArray : 'T[][] -

Returns: 'U array array

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)

chooser : 'T -> 'U option

jArray : 'T[][]

Returns: 'U array array

Example

innerFilter predicate jArray

Full Usage: innerFilter predicate jArray

Parameters:
    predicate : 'T -> bool -
    jArray : 'T[][] -

Returns: 'T array array

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

predicate : 'T -> bool

jArray : 'T[][]

Returns: 'T array array

Example

innerFold folder state jArray

Full Usage: innerFold folder state jArray

Parameters:
    folder : 'State -> 'T -> 'State -
    state : 'State -
    jArray : 'T[][] -

Returns: 'State array

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

folder : 'State -> 'T -> 'State

state : 'State

jArray : 'T[][]

Returns: 'State array

Example

map mapping jArray

Full Usage: map mapping jArray

Parameters:
    mapping : 'T -> 'U -
    jArray : 'T[][] -

Returns: 'U array array

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

mapping : 'T -> 'U

jArray : 'T[][]

Returns: 'U array array

Example

map2 mapping jArray1 jArray2

Full Usage: map2 mapping jArray1 jArray2

Parameters:
    mapping : 'T1 -> 'T2 -> 'U -
    jArray1 : 'T1[][] -
    jArray2 : 'T2[][] -

Returns: 'U array array

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.

mapping : 'T1 -> 'T2 -> 'U

jArray1 : 'T1[][]

jArray2 : 'T2[][]

Returns: 'U array array

Example

map3 mapping jArray1 jArray2 jArray3

Full Usage: map3 mapping jArray1 jArray2 jArray3

Parameters:
    mapping : 'T1 -> 'T2 -> 'T3 -> 'U -
    jArray1 : 'T1[][] -
    jArray2 : 'T2[][] -
    jArray3 : 'T3[][] -

Returns: 'U array array

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.

mapping : 'T1 -> 'T2 -> 'T3 -> 'U

jArray1 : 'T1[][]

jArray2 : 'T2[][]

jArray3 : 'T3[][]

Returns: 'U array array

Example

mapi mapping jArray

Full Usage: mapi mapping jArray

Parameters:
    mapping : int -> 'T -> 'U -
    jArray : 'T[][] -

Returns: 'U array array

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.

mapping : int -> 'T -> 'U

jArray : 'T[][]

Returns: 'U array array

Example

ofArray2D arr

Full Usage: ofArray2D arr

Parameters:
    arr : 'T[,] -

Returns: 'T array array

Converts a jagged array into an Array2D

arr : 'T[,]

Returns: 'T array array

Example

ofJaggedList data

Full Usage: ofJaggedList data

Parameters:
    data : 'T list list -

Returns: 'T array array

Converts a jagged list into a jagged array

data : 'T list list

Returns: 'T array array

Example

ofJaggedSeq data

Full Usage: ofJaggedSeq data

Parameters:
    data : 'a seq -

Returns: 'T array array

Converts a jagged Seq into a jagged array

data : 'a seq

Returns: 'T array array

Example

shuffle arr

Full Usage: shuffle arr

Parameters:
    arr : 'T[][] -

Returns: 'T array array

Shuffels a jagged array (method: Fisher-Yates)

arr : 'T[][]

Returns: 'T array array

Example

shuffleColumnWise arr

Full Usage: shuffleColumnWise arr

Parameters:
    arr : 'T[][] -

Returns: 'T array array

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

arr : 'T[][]

Returns: 'T array array

Example

shuffleColumnWiseInPlace arr

Full Usage: shuffleColumnWiseInPlace arr

Parameters:
    arr : 'T[][] -

Returns: 'T[][]

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

arr : 'T[][]

Returns: 'T[][]

Example

shuffleInPlace arr

Full Usage: shuffleInPlace arr

Parameters:
    arr : 'T[][] -

Returns: 'T[][]

Shuffels a jagged array (method: Fisher-Yates) in place

arr : 'T[][]

Returns: 'T[][]

Example

shuffleRowWise arr

Full Usage: shuffleRowWise arr

Parameters:
    arr : 'T[][] -

Returns: 'T array array

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

arr : 'T[][]

Returns: 'T array array

Example

shuffleRowWiseInPlace arr

Full Usage: shuffleRowWiseInPlace arr

Parameters:
    arr : 'T[][] -

Returns: 'T[][]

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

arr : 'T[][]

Returns: 'T[][]

Example

toArray2D arr

Full Usage: toArray2D arr

Parameters:
    arr : 'T[][] -

Returns: 'T[,]

Converts from an Array2D into an jagged array

arr : 'T[][]

Returns: 'T[,]

Example

toJaggedList arr

Full Usage: toJaggedList arr

Parameters:
    arr : 'T[][] -

Returns: 'T list list

Converts a jagged array into a jagged list

arr : 'T[][]

Returns: 'T list list

Example

toJaggedSeq arr

Full Usage: toJaggedSeq arr

Parameters:
    arr : 'T[][] -

Returns: 'T seq seq

Converts a jagged array into a jagged seq

arr : 'T[][]

Returns: 'T seq seq

Example

transpose arr

Full Usage: transpose arr

Parameters:
    arr : 'T[][] -

Returns: 'T array array

Transposes a jagged array

inner collections (rows) have to be of equal length

arr : 'T[][]

Returns: 'T array array

Example

transpose_ arr

Full Usage: transpose_ arr

Parameters:
    arr : 'T[][] -

Returns: 'T array array

Transposes a jagged array (unchecked)

The resulting row count is determined by first collection length!

arr : 'T[][]

Returns: 'T array array

Example

zeroCreate rowN colN

Full Usage: zeroCreate rowN colN

Parameters:
    rowN : int -
    colN : int -

Returns: 'a array array

Creates an jagged array where the entries are initially the default value Unchecked.defaultof

rowN : int

colN : int

Returns: 'a array array

Example

Type something to start searching.