NormalSource

class that returns gaussian (normal) distributed numbers (f=exp(-0.5*x*x)/sqrt(2*pi))

Constructors

this
this(RandG r)

initializes the probability distribution

Members

Aliases

SourceT
alias SourceT = Ziggurat!(RandG, T, probDensityF, tailGenerator, true)
Undocumented in source.

Functions

getRandom
T getRandom()

returns a normal distribued number

getRandom
T getRandom(T sigma)

returns a normal distribued number with the given sigma (standard deviation)

getRandom
T getRandom(T sigma, T mu)

returns a normal distribued number with the given sigma (standard deviation) and mu (average)

normalD
NormalDistribution normalD(T sigma, T mu)

returns a normal distribution with a non-default sigma/mu

opCall
NormalSource opCall(U a, S args)

chainable call style initialization of variables (thorugh a call to randomize)

randomize
U randomize(U a)

initializes a variable with normal distribued number and returns it

randomize
U randomize(U a, V sigma)

initializes a variable with normal distribued number with the given sigma and returns it

randomize
U randomize(U el, V sigma, S mu)

initializes a variable with normal distribued numbers with the given sigma and mu and returns it

randomizeOp
U randomizeOp(S delegate(T) op, U a)

initializes the variable with the result of mapping op on the random numbers (of type T)

Static functions

cumProbDensityFCompl
real cumProbDensityFCompl(real x)

complement of the cumulative density distribution (integral x..infinity probDensityF)

invProbDensityF
real invProbDensityF(real x)

inverse probability distribution

probDensityF
real probDensityF(real x)

probability distribution (non normalized, should be divided by sqrt(2*PI))

tailGenerator
T tailGenerator(RandG r, T dMin, int iNegative)

tail for normal distribution

Structs

NormalDistribution
struct NormalDistribution

normal distribution with different default sigma and mu f=exp(-x*x/(2*sigma^2))/(sqrt(2 pi)*sigma)

Variables

source
SourceT source;

internal source of normal numbers

Meta