(bind-seed seed & body)Sets the seed for the RNGs to seed for the code in body. If used with a
lazy sequence, ensure the seq is realized within the scope of the binding
otherwise you will get inconsistent results.
Sets the seed for the RNGs to `seed` for the code in `body`. If used with a lazy sequence, ensure the seq is realized within the scope of the binding otherwise you will get inconsistent results.
(do-set-seed! seed & body)Runs set-seed! with seed and then executes body.
Runs [[set-seed!]] with `seed` and then executes `body`.
(mersenne-rnd-lazy seed)Returns rnd-lazy using seed.
Returns rnd-lazy using `seed`.
(mersenne-rng seed)Creates an Apache RNG using seed.
Creates an Apache RNG using `seed`.
(quasi-rnd-vector-lazy dimensions)Better coverage but more predictable through a lazy sequence of vectors of
size dimensions. Because of predictability, can be better for a single use
simulation.
Better coverage but more predictable through a lazy sequence of vectors of size `dimensions`. Because of predictability, can be better for a single use simulation.
(quasi-rng dimensions)Creates an Apache RNG with better coverage but more predictable through a
lazy sequence of vectors of size dimensions. Because of predictability, can
be better for a single use simulation.
Creates an Apache RNG with better coverage but more predictable through a lazy sequence of vectors of size `dimensions`. Because of predictability, can be better for a single use simulation.
(random-bool rnd)Returns a random boolean.
Returns a random boolean.
(random-long rnd)(random-long rnd [lower upper])Returns a random long within the given interval (or any long by default).
Returns a random long within the given interval (or any long by default).
(random-normal rnd)Returns a value drawn from a standard Normal distribution.
Returns a value drawn from a standard Normal distribution.
(rnd rng)(rnd rng [lower upper])Returns a random finite within the given interval (or [0, 1] by default).
Returns a random finite within the given interval (or [0, 1] by default).
(rnd!)(rnd! [lower upper])Returns a random finite within the given interval (or [0, 1] by default).
Returns a random finite within the given interval (or [0, 1] by default).
(rnd-lazy rng)Returns a lazy seq of random rnds.
Returns a lazy seq of random rnds.
(rnd-lazy!)Returns a lazy seq of random doubles.
Returns a lazy seq of random doubles.
(rnd-long rng)(rnd-long rng [lower upper])Returns a random long within the given interval (or any long by default).
Returns a random long within the given interval (or any long by default).
(rnd-long!)(rnd-long! [lower upper])Returns a random long within the given interval (or any long by default).
Returns a random long within the given interval (or any long by default).
(rnd-long-lazy rng)Returns a lazy seq of random longs.
Returns a lazy seq of random longs.
(rnd-long-lazy!)Returns a lazy seq of random longs.
Returns a lazy seq of random longs.
(rnd-normal rng)Returns a value randomly drawn from a standard Normal distribution.
Returns a value randomly drawn from a standard Normal distribution.
(rnd-normal!)Returns a value randomly drawn from a standard Normal distribution.
Returns a value randomly drawn from a standard Normal distribution.
(rng$)Makes a new RNG from the current clock time.
Makes a new RNG from the current clock time.
(rng-gen rng)Returns a function that will generate random numbers from the bound or other static RNG.
Returns a function that will generate random numbers from the bound or other static RNG.
(rng-lazy rng)Returns a lazy sequence of RNG where each iteration is split from the previous.
Returns a lazy sequence of RNG where each iteration is split from the previous.
(rng-lazy!)Returns a lazy sequence of RNG where each iteration is split from the previous.
Returns a lazy sequence of RNG where each iteration is split from the previous.
(secure-rnd-lazy seed)A less predictable but slower rnd-lazy than Mersenne Twister.
A less predictable but slower rnd-lazy than Mersenne Twister.
(secure-rng seed)Creates an Apache RNG that is less predictable but slower RNG than Mersenne Twister.
Creates an Apache RNG that is less predictable but slower RNG than Mersenne Twister.
(seed$)Returns a new seed from the current clock time.
Returns a new seed from the current clock time.
(set-seed! seed)Sets the RNG generator to seed.
Sets the RNG generator to `seed`.
(set-seed!$)Sets the RNG generator to the current clock time.
Sets the RNG generator to the current clock time.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |