Simple RNG by Bob Jenkins:
- Companion:
- object
- Source:
- Seed.scala
Value members
Concrete methods
Generates a Double value.
Generates a Double value.
The values will be uniformly distributed, and will be contained in the interval [0.0, 1.0).
- Source:
- Seed.scala
Generates a Long value.
Generates a Long value.
The values will be uniformly distributed.
- Source:
- Seed.scala
Generate the next seed in the RNG's sequence.
Generate the next seed in the RNG's sequence.
- Source:
- Seed.scala
Reseed the RNG using the given Long value.
Reseed the RNG using the given Long value.
- Source:
- Seed.scala
This is a quick way of deterministically sliding this RNG to a different part of the PRNG sequence.
This is a quick way of deterministically sliding this RNG to a different part of the PRNG sequence.
We use this as an easy way to "split" the RNG off into a new part of the sequence. We want to do this in situations where we've already called .next several times, and we want to avoid repeating those numbers while preserving determinism.
- Source:
- Seed.scala
Generate a Base-64 representation of this seed.
Generate a Base-64 representation of this seed.
Given a seed, this method will return a String with 44 characters, according to the web-safe Base-64 specification (i.e. using minus (-) and underscore (_) in addition to alphanumeric characters).
The 256-bit seed is serialized as a little-endian array of 64-bit Long values. Strings produced by this method are guaranteed to be parseable by the Seed.fromBase64 method.
- Source:
- Seed.scala