The OpenD Programming Language

NormalVariable

$(WIKI_D Normal).

Constructors

this
this(T location, T scale)

Postblit

A postblit is present on this object, but not explicitly documented in the source.

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;

Return Value

X ~ N(μ, σ)

Examples

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

Meta