The OpenD Programming Language

GammaVariable

$(WIKI_D Gamma).

Constructors

this
this(T shape, T scale)

Members

Functions

opCall
T opCall(G gen)
T opCall(G* gen)

Manifest constants

isRandomVariable
enum isRandomVariable;

Variables

max
enum T max;
min
enum T min;

Parameters

T

floating point type

Exp

if true log-scaled values are produced. ExpGamma(𝝰, 𝞫). The flag is useful when shape parameter is small (𝝰 << 1).

Return Value

X ~ Gamma(𝝰, 𝞫)

Examples

auto rv = gammaVar;
static assert(isRandomVariable!(typeof(rv)));
import mir.random.engine;
auto x = rv(rne);
import mir.random.engine;
Random* gen = threadLocalPtr!Random;
auto rv = GammaVariable!double(1, 1);
auto x = rv(gen);

Meta