Class Gaussian
- Namespace
- NominalSystems.Maths
- Assembly
- NominalSystems.Maths.dll
[NominalSystems] This class handles Gaussian functionality in which a "bell curve" shape is produced when graphed. It also handles normal distribution where 68-95-99.7% of values occur within 1, 2, 3 standard deviation of the mean.
public class Gaussian
- Inheritance
-
Gaussian
Constructors
Gaussian(double, double)
Default constructor
public Gaussian(double mean, double sigma)
Parameters
Fields
Mean
The mean value
public double Mean
Field Value
Sigma
The standard deviation
public double Sigma
Field Value
Properties
Maximum
[-] The maximum value of the normalized curve based on the standard deviation
public double Maximum { get; }
Property Value
RandomSeed
The random generator seed
public long RandomSeed { get; }
Property Value
Methods
GetProbabilityDensityFunction(double)
[-] Returns the relative likelihood of the value being chosen. This uses the general Probability Density Function (PDF).
public double GetProbabilityDensityFunction(double value)
Parameters
value
doubleThe value input
Returns
- double
The relative likelihood of the value being chosen
GetUnnormalisedValue(double)
[-] Returns the height of the curve at the input value.
public double GetUnnormalisedValue(double value)
Parameters
value
doubleThe value input
Returns
NextDouble()
[-] Calculate the next random value within the normal distribution using the Marsaglia polar method.
public double NextDouble()
Returns
SetSeed(long)
Set random generator seed
public void SetSeed(long seed)
Parameters
seed
longthe seed