Polymorphic functions that populate Neanderthal's data structures with random numbers drawn from common distributions.
Polymorphic functions that populate Neanderthal's data structures with random numbers drawn from common distributions. [[rng-state]], [[rand-normal!]], [[rand-uniform!]]
(rand-normal! x)
(rand-normal! rng-state x)
(rand-normal! mu sigma x)
(rand-normal! rng-state mu sigma x)
Populates vector x
with normally distributed random numbers.
The distribution is controlled by arguments mu
and sigma
.
If rng-state
is not provided, uses the global default rng state.
Populates vector `x` with normally distributed random numbers. The distribution is controlled by arguments `mu` and `sigma`. If `rng-state` is not provided, uses the global default rng state.
(rand-uniform! x)
(rand-uniform! rng-state x)
(rand-uniform! lower upper x)
(rand-uniform! rng-state lower upper x)
Populates vector x
with uniformly distributed random numbers.
The distribution is controlled by arguments lower
and upper
.
If rng-state
is not provided, uses the engine's global default rng state.
Populates vector `x` with uniformly distributed random numbers. The distribution is controlled by arguments `lower` and `upper`. If `rng-state` is not provided, uses the engine's global default rng state.
(rng-state fact)
(rng-state fact seed)
Creates a random number generator state compatible with a factory. Optionally accepts the seed for reproducibility.
Creates a random number generator state compatible with a factory. Optionally accepts the seed for reproducibility.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close