The OpenD Programming Language

normalVar

$(WIKI_D Normal).

normalVar
(
T = double
)
(
in T location = 0.0
,
in T scale = 1
)

Return Value

Type: NormalVariable!T

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