The OpenD Programming Language

dstats.random

Generates random samples from a various probability distributions. * These are mostly D ports of the NumPy random number generators.

Public Imports

std.random
public import std.random;
Undocumented in source.

Members

Functions

rBernoulli
int rBernoulli(double P, RGen gen)
rBeta
double rBeta(double a, double b, RGen gen)
rBinomial
int rBinomial(int n, double p, RGen gen)
rCauchy
double rCauchy(double X0, double gamma, RGen gen)
rChiSquare
double rChiSquare(double df, RGen gen)
rExponential
double rExponential(double lambda, RGen gen)
rFisher
double rFisher(double df1, double df2, RGen gen)
rGamma
double rGamma(double a, double b, RGen gen)
rHypergeometric
int rHypergeometric(int n1, int n2, int n, RGen gen)
rLaplace
double rLaplace(double mu, double b, RGen gen)
rLogNormal
double rLogNormal(double mu, double sigma, RGen gen)
rLogistic
double rLogistic(double loc, double scale, RGen gen)
rNegBinom
int rNegBinom(double n, double p, RGen gen)
rNormal
double rNormal(double mean, double sd, RGen gen)
rPoisson
int rPoisson(double lam, RGen gen)
rRayleigh
double rRayleigh(double mode, RGen gen)
rStudentsT
double rStudentsT(double df, RGen gen)
rWald
double rWald(double mu, double lambda, RGen gen)
rWeibull
double rWeibull(double shape, double scale, RGen gen)
randArray
auto randArray(size_t N, Args args)

Convenience function to allow one-statement creation of arrays of random numbers.

randArray
R[] randArray(size_t N, Args args)

Allows the creation of an array of random numbers with an explicitly specified type. Useful, for example, when single-precision floats are all you need.

randRange
RandRange!(randFun, T) randRange(T params)

Turn a random number generator function into an infinite range. Params is a tuple of the distribution parameters. This is specified in the same order as when calling the function directly.

Structs

RandRange
struct RandRange(alias randFun, T...)

Meta