C# Class LitDev.LDStatistics

Afficher le fichier Open project: litdev1/LitDev

Méthodes publiques

Méthode Description
Differentiate ( Primitive array ) : Primitive

Calculate the derivative of a 1D data array.

DistBinomial ( Primitive n, Primitive p ) : Primitive

Create an array with a Binomial distribution. This is like the probablity of getting k heads from 20 (n) coin tosses, with a probablity for each toss getting a heads of 0.5 (p).

DistNormal ( Primitive distMean, Primitive distSTD, Primitive size ) : Primitive

Create an array with a Normal distribution.

DistTriangular ( Primitive rangeMin, Primitive rangeMax, Primitive size ) : Primitive

Create an array with a Triangular distribution.

DistUniform ( Primitive rangeMin, Primitive rangeMax, Primitive size ) : Primitive

Create an array with a Uniform distribution.

Frequency ( Primitive array, Primitive bins, Primitive normalised ) : Primitive

Calculate a frequency distribution from array of data.

Integrate ( Primitive array ) : Primitive

Calculate the integral of a 1D data array.

InterpolateX ( Primitive array, Primitive y ) : Primitive

Interpolate a 1D data array to find the value of x(y). The values of y should be monotonically increasing with x.

InterpolateY ( Primitive array, Primitive x ) : Primitive

Interpolate a 1D data array to find the value of y(x). The values of x should be monotonically increasing.

SetArray ( Primitive array ) : Primitive

Set a 1D array of numbers to perform some statistics on. This command must be called before any statistics are calculated.

Private Methods

Méthode Description
binomial ( int n, int k ) : double
factorial ( int n ) : double
formData ( string array ) : void
interpolateX ( double y ) : double
interpolateY ( double x ) : double
setData ( string array ) : void
setPoints ( string array ) : void

Method Details

Differentiate() public static méthode

Calculate the derivative of a 1D data array.
public static Differentiate ( Primitive array ) : Primitive
array Primitive The array to differentiate (array[x]=y).
Résultat Primitive

DistBinomial() public static méthode

Create an array with a Binomial distribution. This is like the probablity of getting k heads from 20 (n) coin tosses, with a probablity for each toss getting a heads of 0.5 (p).
public static DistBinomial ( Primitive n, Primitive p ) : Primitive
n Primitive The number of tries.
p Primitive The probablity of success for each try.
Résultat Primitive

DistNormal() public static méthode

Create an array with a Normal distribution.
public static DistNormal ( Primitive distMean, Primitive distSTD, Primitive size ) : Primitive
distMean Primitive The mean of the distribution.
distSTD Primitive The standard deviation of the distribution.
size Primitive The number of points.
Résultat Primitive

DistTriangular() public static méthode

Create an array with a Triangular distribution.
public static DistTriangular ( Primitive rangeMin, Primitive rangeMax, Primitive size ) : Primitive
rangeMin Primitive The minimum value.
rangeMax Primitive The maximum value.
size Primitive The number of points.
Résultat Primitive

DistUniform() public static méthode

Create an array with a Uniform distribution.
public static DistUniform ( Primitive rangeMin, Primitive rangeMax, Primitive size ) : Primitive
rangeMin Primitive The minimum value.
rangeMax Primitive The maximum value.
size Primitive The number of points.
Résultat Primitive

Frequency() public static méthode

Calculate a frequency distribution from array of data.
public static Frequency ( Primitive array, Primitive bins, Primitive normalised ) : Primitive
array Primitive The array to create the frequency distribution from.
bins Primitive The number of bins spanning the data.
normalised Primitive Is the frequency normalised to integrate to 1 ("True" or "False").
Résultat Primitive

Integrate() public static méthode

Calculate the integral of a 1D data array.
public static Integrate ( Primitive array ) : Primitive
array Primitive The array to integrate (array[x]=y).
Résultat Primitive

InterpolateX() public static méthode

Interpolate a 1D data array to find the value of x(y). The values of y should be monotonically increasing with x.
public static InterpolateX ( Primitive array, Primitive y ) : Primitive
array Primitive The array to interpolate (array[x]=y).
y Primitive The value of y (may be an array of y values).
Résultat Primitive

InterpolateY() public static méthode

Interpolate a 1D data array to find the value of y(x). The values of x should be monotonically increasing.
public static InterpolateY ( Primitive array, Primitive x ) : Primitive
array Primitive The array to interpolate (array[x]=y).
x Primitive The value of x (may be an array of x values).
Résultat Primitive

SetArray() public static méthode

Set a 1D array of numbers to perform some statistics on. This command must be called before any statistics are calculated.
public static SetArray ( Primitive array ) : Primitive
array Primitive /// The array to perform statistics on. ///
Résultat Primitive