Array4D Module
Contains operations for working with rank 4 arrays.
Functions and values
Function or value |
Description
|
Full Usage:
Array4D.create length1 length2 length3 length4 initial
Parameters:
int
-
The length of the first dimension.
length2 : int
-
The length of the second dimension.
length3 : int
-
The length of the third dimension.
length4 : int
-
The length of the fourth dimension.
initial : 'T
-
The initial value for each element of the array.
Returns: 'T[,,,]
The created array.
|
Creates an array whose elements are all initially the given value
Example
module Array4D
from Microsoft.FSharp.Collections
val create: length1: int -> length2: int -> length3: int -> length4: int -> initial: 'T -> 'T array4d
Evaluates to a 2x2x2x2 array with all entries 1
|
Full Usage:
Array4D.get array index1 index2 index3 index4
Parameters:
'T[,,,]
-
The input array.
index1 : int
-
The index along the first dimension.
index2 : int
-
The index along the second dimension.
index3 : int
-
The index along the third dimension.
index4 : int
-
The index along the fourth dimension.
Returns: 'T
The value at the given index.
|
Fetches an element from a 4D array. You can also use the syntax 'array.[index1,index2,index3,index4]' Indexer syntax is generally preferred, e.g.
Multiple items
val array: float array4d -------------------- type 'T array = 'T array Multiple items
val float: value: 'T -> float (requires member op_Explicit) -------------------- type float = System.Double -------------------- type float<'Measure> = float module Array4D
from Microsoft.FSharp.Collections
val zeroCreate: length1: int -> length2: int -> length3: int -> length4: int -> 'T array4d
Example
Multiple items
val array: obj array4d -------------------- type 'T array = 'T array module Array4D
from Microsoft.FSharp.Collections
val zeroCreate: length1: int -> length2: int -> length3: int -> length4: int -> 'T array4d
val get: array: 'T array4d -> index1: int -> index2: int -> index3: int -> index4: int -> 'T
|
Full Usage:
Array4D.init length1 length2 length3 length4 initializer
Parameters:
int
-
The length of the first dimension.
length2 : int
-
The length of the second dimension.
length3 : int
-
The length of the third dimension.
length4 : int
-
The length of the fourth dimension.
initializer : int -> int -> int -> int -> 'T
-
The function to create an initial value at each index in the array.
Returns: 'T[,,,]
The created array.
|
Creates an array given the dimensions and a generator function to compute the elements.
Example
module Array4D
from Microsoft.FSharp.Collections
val init: length1: int -> length2: int -> length3: int -> length4: int -> initializer: (int -> int -> int -> int -> 'T) -> 'T array4d
val i: int
val j: int
val k: int
val l: int
Evaluates to a 2x2x2x2 array with contents [[[[0; 1]; [10; 11]]; [[100; 101]; [110; 111]]];[[[1000; 1]; [1010; 1011]]; [[1100; 1101]; [1110; 1111]]]]
|
Full Usage:
Array4D.length1 array
Parameters:
'T[,,,]
-
The input array.
Returns: int
The length of the array in the first dimension.
|
Returns the length of an array in the first dimension
Example
type 'T array = 'T array
module Array4D
from Microsoft.FSharp.Collections
val init: length1: int -> length2: int -> length3: int -> length4: int -> initializer: (int -> int -> int -> int -> 'T) -> 'T array4d
val i: int
val j: int
val k: int
val length1: array: 'T array4d -> int
Evaluates to 2 .
|
Full Usage:
Array4D.length2 array
Parameters:
'T[,,,]
-
The input array.
Returns: int
The length of the array in the second dimension.
|
Returns the length of an array in the second dimension.
Example
type 'T array = 'T array
module Array4D
from Microsoft.FSharp.Collections
val init: length1: int -> length2: int -> length3: int -> length4: int -> initializer: (int -> int -> int -> int -> 'T) -> 'T array4d
val i: int
val j: int
val k: int
val length2: array: 'T array4d -> int
Evaluates to 3 .
|
Full Usage:
Array4D.length3 array
Parameters:
'T[,,,]
-
The input array.
Returns: int
The length of the array in the third dimension.
|
Returns the length of an array in the third dimension.
Example
type 'T array = 'T array
module Array4D
from Microsoft.FSharp.Collections
val init: length1: int -> length2: int -> length3: int -> length4: int -> initializer: (int -> int -> int -> int -> 'T) -> 'T array4d
val i: int
val j: int
val k: int
val length3: array: 'T array4d -> int
Evaluates to 4 .
|
Full Usage:
Array4D.length4 array
Parameters:
'T[,,,]
-
The input array.
Returns: int
The length of the array in the fourth dimension.
|
Returns the length of an array in the fourth dimension.
Example
type 'T array = 'T array
module Array4D
from Microsoft.FSharp.Collections
val init: length1: int -> length2: int -> length3: int -> length4: int -> initializer: (int -> int -> int -> int -> 'T) -> 'T array4d
val i: int
val j: int
val k: int
val length4: array: 'T array4d -> int
Evaluates to 5 .
|
Full Usage:
Array4D.set array index1 index2 index3 index4 value
Parameters:
'T[,,,]
-
The input array.
index1 : int
-
The index along the first dimension.
index2 : int
-
The index along the second dimension.
index3 : int
-
The index along the third dimension.
index4 : int
-
The index along the fourth dimension.
value : 'T
-
The value to set.
|
Sets the value of an element in an array. You can also use the syntax 'array.[index1,index2,index3,index4] <- value'. Indexer syntax is generally preferred, e.g.
Multiple items
val array: float array4d -------------------- type 'T array = 'T array Multiple items
val float: value: 'T -> float (requires member op_Explicit) -------------------- type float = System.Double -------------------- type float<'Measure> = float module Array4D
from Microsoft.FSharp.Collections
val zeroCreate: length1: int -> length2: int -> length3: int -> length4: int -> 'T array4d
Example
Multiple items
val array: obj array4d -------------------- type 'T array = 'T array module Array4D
from Microsoft.FSharp.Collections
val zeroCreate: length1: int -> length2: int -> length3: int -> length4: int -> 'T array4d
|
Full Usage:
Array4D.zeroCreate length1 length2 length3 length4
Parameters:
int
-
The length of the first dimension.
length2 : int
-
The length of the second dimension.
length3 : int
-
The length of the third dimension.
length4 : int
-
The length of the fourth dimension.
Returns: 'T[,,,]
The created array.
|
Creates an array where the entries are initially the "default" value.
Example
Multiple items
val array: float array4d -------------------- type 'T array = 'T array Multiple items
val float: value: 'T -> float (requires member op_Explicit) -------------------- type float = System.Double -------------------- type float<'Measure> = float module Array4D
from Microsoft.FSharp.Collections
val zeroCreate: length1: int -> length2: int -> length3: int -> length4: int -> 'T array4d
After evaluation array is a 2x3x3x5 array with contents all zero.
|