C# Class NSoft.NFramework.Numerics.Distributions.Continuous.Normal

정규 분포. Implements the univariate Normal (or Gaussian) distribution. For details about this distribution, see Wikipedia - Normal distribution.

The distribution will use the System.Random by default. Users can get/set the random number generator by using the RandomSource property.

The statistics classes will check all the incoming parameters whether they are in the allowed range. This might involve heavy computation. Optionally, by setting Control.CheckDistributionParameters to false, all parameter checks can be turned off.

Inheritance: IContinuousDistribution
Exibir arquivo Open project: debop/NFramework Class Usage Examples

Public Methods

Method Description
CumulativeDistribution ( double x ) : double

확률 분포 계산을 위한 누적분포함수

Density ( double x ) : double

분포의 확률 밀도

Density ( double mean, double stDev, double x ) : double

정규분포의 밀도를 계산합니다.

DensityLn ( double x ) : double

분포의 로그 확률 밀도

DensityLn ( double mean, double stDev, double x ) : double

정규분포의 로그 밀도를 계산합니다.

InverseCumulativeDistribution ( double p ) : double

Computes the inverse cumulative distribution function of the normal distribution.

Normal ( ) : System

생성자

Normal ( double mean = 0.0, double stDev = 1.0, Func randomFactory = null ) : System

정규분포 생성자

Sample ( ) : double

분포의 무작위 값을 제공합니다.

Sample ( Random rnd, double mean, double stDev ) : double

Generates a sample from the normal distribution using the Box-Muller algorithm.

Samples ( ) : IEnumerable

현 분포의 무작위 값을 열거합니다.

Samples ( Random rnd, double mean, double stDev ) : IEnumerable

Generates a sequence of samples from the normal distribution using the Box-Muller algorithm.

ToString ( ) : string
WithMeanPrecision ( double mean, double precision ) : Normal
WithMeanStDev ( double mean, double stDev ) : Normal
WithMeanVariance ( double mean, double variance ) : Normal

Private Methods

Method Description
AssertParameters ( double mean, double stddev ) : void
CumulativeDistribution ( double mean, double sdev, double x ) : double

Computes the cumulative distribution function of the normal distribution.

SampleBoxMuller ( Random rnd ) : double>.Tuple

Samples a pair of standard normal distributed random variables using the Box-Muller algorithm.

SetParameters ( double mean, double stdDev ) : void

Method Details

CumulativeDistribution() public method

확률 분포 계산을 위한 누적분포함수
public CumulativeDistribution ( double x ) : double
x double The location at which to compute the cumulative distribution function.
return double

Density() public method

분포의 확률 밀도
public Density ( double x ) : double
x double
return double

Density() public static method

정규분포의 밀도를 계산합니다.
public static Density ( double mean, double stDev, double x ) : double
mean double
stDev double
x double
return double

DensityLn() public method

분포의 로그 확률 밀도
public DensityLn ( double x ) : double
x double
return double

DensityLn() public static method

정규분포의 로그 밀도를 계산합니다.
public static DensityLn ( double mean, double stDev, double x ) : double
mean double
stDev double
x double
return double

InverseCumulativeDistribution() public method

Computes the inverse cumulative distribution function of the normal distribution.
public InverseCumulativeDistribution ( double p ) : double
p double The location at which to compute the inverse cumulative density.
return double

Normal() public method

생성자
public Normal ( ) : System
return System

Normal() public method

정규분포 생성자
public Normal ( double mean = 0.0, double stDev = 1.0, Func randomFactory = null ) : System
mean double 평균
stDev double 표준편차
randomFactory Func 난수발생기 Factory
return System

Sample() public method

분포의 무작위 값을 제공합니다.
public Sample ( ) : double
return double

Sample() public static method

Generates a sample from the normal distribution using the Box-Muller algorithm.
public static Sample ( Random rnd, double mean, double stDev ) : double
rnd System.Random The random number generator to use.
mean double The mean of the normal distribution from which to generate samples.
stDev double The standard deviation of the normal distribution from which to generate samples.
return double

Samples() public method

현 분포의 무작위 값을 열거합니다.
public Samples ( ) : IEnumerable
return IEnumerable

Samples() public static method

Generates a sequence of samples from the normal distribution using the Box-Muller algorithm.
public static Samples ( Random rnd, double mean, double stDev ) : IEnumerable
rnd System.Random The random number generator to use.
mean double The mean of the normal distribution from which to generate samples.
stDev double The standard deviation of the normal distribution from which to generate samples.
return IEnumerable

ToString() public method

public ToString ( ) : string
return string

WithMeanPrecision() public static method

public static WithMeanPrecision ( double mean, double precision ) : Normal
mean double
precision double
return Normal

WithMeanStDev() public static method

public static WithMeanStDev ( double mean, double stDev ) : Normal
mean double
stDev double
return Normal

WithMeanVariance() public static method

public static WithMeanVariance ( double mean, double variance ) : Normal
mean double
variance double
return Normal