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.

Public Imports

std.random
public import std.random;

Members

Functions

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

See Also

Meta

Authors

John D. Cook.