auto-opti.prng
Pseudo random number generator.
Use this feature to build a prng based on a parameter map. This hides the complexity of the different random number generator, as many different implementations exists and none superseeds all others.
as-double
(as-double prng min-double max-double)Returns a double generated with prng between [min-double; max-double[.
as-double-pair
(as-double-pair prng min-double max-double)Returns a pair of random doubles between [min-double; max-double[.
as-doubles
(as-doubles prng n min-double max-double)Draw n random doubles with prng, between [min-double; max-double[.
as-int
(as-int prng min-int max-int)Returns an integer generated with prng between [min-int; max-int[.
as-int-pair
(as-int-pair prng min-int max-int)Returns a pair of random integer between [min-int; max-int[.
as-ints
(as-ints prng n min-int max-int)Draw n random integers with prng, between [min-int; max-int[.
duplicate
(duplicate this)Duplicates this prng to a new one, starting at the seed value.
jump
(jump this)Jump to a completly different place.
prng
(prng {:auto-opti/keys [prng-name seed registry], :as params})Creates a prng based on a parameter map.
prng-registry
Registry of prngs, with a function turning a seed into an implementation of opt-prng-stateful/PRNG.
reset
(reset this)Returns a prng that starts again at the seed value.
uuid-seed
(uuid-seed this)Returns the seed of the random number generator.