Header menu logo FSharp.Stats

ThreeDimensional Module

Types

Type Description

Padding3DMethod

Functions and values

Function or value Description

pad data borderpadding paddingMethod

Full Usage: pad data borderpadding paddingMethod

Parameters:
    data : ^a[,] - A two dimensional array
    borderpadding : int - The number of points to add to each side
    paddingMethod : Padding3DMethod - The padding method to use

Returns: float[,] A two dimensional array, containing the data of the original array padded with artificial data points on each side.
Modifiers: inline
Type parameters: ^a

Pads artificial data points to the borders of the given two dimensional array.

data : ^a[,]

A two dimensional array

borderpadding : int

The number of points to add to each side

paddingMethod : Padding3DMethod

The padding method to use

Returns: float[,]

A two dimensional array, containing the data of the original array padded with artificial data points on each side.

Example

 
  let data2D =
            let rnd = System.Random()
            Array2D.init 50 50 (fun i j -> 
            if (i,j) = (15,15) then 5.
            elif (i,j) = (35,35) then -5.
            else rnd.NextDouble())
 
  let padding = 11
       
  // padding the data points with 11 artificial random points on each side
  let paddedData2D = Padding.Discrete.ThreeDimensional.pad data2D padding Padding.Discrete.ThreeDimensional.Random
val data2D: float array2d
val rnd: System.Random
namespace System
Multiple items
type Random = new: unit -> unit + 1 overload member GetItems<'T> : choices: ReadOnlySpan<'T> * length: int -> 'T array + 2 overloads member Next: unit -> int + 2 overloads member NextBytes: buffer: byte array -> unit + 1 overload member NextDouble: unit -> float member NextInt64: unit -> int64 + 2 overloads member NextSingle: unit -> float32 member Shuffle<'T> : values: Span<'T> -> unit + 1 overload static member Shared: Random
<summary>Represents a pseudo-random number generator, which is an algorithm that produces a sequence of numbers that meet certain statistical requirements for randomness.</summary>

--------------------
System.Random() : System.Random
System.Random(Seed: int) : System.Random
module Array2D from Microsoft.FSharp.Collections
val init: length1: int -> length2: int -> initializer: (int -> int -> 'T) -> 'T array2d
val i: int
val j: int
System.Random.NextDouble() : float
val padding: int
val paddedData2D: obj

Type something to start searching.