Purely functional and splittable pseudo-random number generators.
Purely functional and splittable pseudo-random number generators.
(rand-double rng)
Returns a random double between 0.0 (inclusive) and 1.0 (exclusive) based on the given immutable RNG. Note: to maintain independence you should not call more than one function in the IRandom protocol with the same argument
Returns a random double between 0.0 (inclusive) and 1.0 (exclusive) based on the given immutable RNG. Note: to maintain independence you should not call more than one function in the IRandom protocol with the same argument
(rand-long rng)
Returns a random long based on the given immutable RNG. Note: to maintain independence you should not call more than one function in the IRandom protocol with the same argument
Returns a random long based on the given immutable RNG. Note: to maintain independence you should not call more than one function in the IRandom protocol with the same argument
(split rng)
Returns two new RNGs [rng1 rng2], which should generate sufficiently independent random data. Note: to maintain independence you should not call more than one function in the IRandom protocol with the same argument
Returns two new RNGs [rng1 rng2], which should generate sufficiently independent random data. Note: to maintain independence you should not call more than one function in the IRandom protocol with the same argument
(split-n rng n)
Returns a collection of n
RNGs, which should generate
sufficiently independent random data.
Note: to maintain independence you should not call more than one
function in the IRandom protocol with the same argument
Returns a collection of `n` RNGs, which should generate sufficiently independent random data. Note: to maintain independence you should not call more than one function in the IRandom protocol with the same argument
Returns a random-number generator. Successive calls should return independent results.
Returns a random-number generator. Successive calls should return independent results.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close