gfm.math.simplerng

Translation of SimpleRNG. Removed the builtin RNG to use std.random, but kept the distribution functions. John D. Cook confirmed this code as public domain.

Members

Functions

randBeta
double randBeta(ref RNG rng, double a, double b)
randCauchy
double randCauchy(ref RNG rng, double median, double scale)
randChiSquare
double randChiSquare(ref RNG rng, double degreesOfFreedom)
randExponential
double randExponential(ref RNG rng, double mean = 1.0)
randGamma
double randGamma(ref RNG rng, double shape, double scale)
randInverseGamma
double randInverseGamma(ref RNG rng, double shape, double scale)
randLaplace
double randLaplace(ref RNG rng, double mean, double scale)
randLogNormal
double randLogNormal(ref RNG rng, double mu, double sigma)
randNormal
double randNormal(ref RNG rng, double mean = 0.0, double standardDeviation = 1.0)
randPoisson
int randPoisson(ref RNG rng, double lambda)
randStudentT
double randStudentT(ref RNG rng, double degreesOfFreedom)
randWeibull
double randWeibull(ref RNG rng, double shape, double scale)

See Also

Meta

Authors

John D. Cook.