Liking cljdoc? Tell your friends :D

automaton-optimization.randomness.impl.prng.stateful

A stateful prng definition.

Statefulness is important to ensure:

  • Each call to rnd is modifying the state of the prng.
  • it is thread safe to use.
A stateful prng definition.

Statefulness is important to ensure:
* Each call to `rnd` is modifying the state of the prng.
* it is thread safe to use.
raw docstring

as-doubleclj/s

(as-double prng min-double max-double)

Returns a double generated with prng between [min-double, max-double[.

Returns a double generated with `prng` between `[min-double, max-double[`.
raw docstring

as-intclj/s

(as-int prng min-int max-int)

Returns an integer generated with prng between [min-int; max-int[.

Returns an integer generated with `prng` between `[min-int; max-int[`.
raw docstring

draw-intsclj/s

(draw-ints prng n min-int max-int)

Draw n random integers with prng, between [min-int; max-int[.

Draw `n` random integers with `prng`, between `[min-int; max-int[`.
raw docstring

PRNGclj/sprotocol

duplicateclj/s

(duplicate _)

Duplicates this prng to a new one, starting at the seed value.

Duplicates this prng to a new one, starting at the seed value.

jumpclj/s

(jump _)

Jump to a completly different place.

Jump to a completly different place.

resetclj/s

(reset _)

Returns a prng that starts again at the seed value.

Returns a prng that starts again at the seed value.

rndclj/s

(rnd _)

Returns a random number and change the state of the prng so next call will return a new value.

Returns a random number and change the state of the prng so next call will return a new value.

rnd-rangeclj/s

(rnd-range _)

Returns the range in which rnd is returned.

Returns the range in which rnd is returned.

seedclj/s

(seed _)

Returns the seed of the random number generator.

Returns the seed of the random number generator.

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close