spire.random.rng

Type members

Classlikes

abstract
class BurtleCompanion[G <: BurtleRot32] extends GeneratorCompanion[G, Array[Int]]
final
class BurtleRot2(_a: Int, _b: Int, _c: Int, _d: Int) extends BurtleRot32

Bit-mixing random number generator based on rotations from Bob Burtle. Maintains 16 bytes of state information. Good speed and randomness (see Burtle3rot for better randomness). Algorithm from http://burtleburtle.net/bob/rand/

Bit-mixing random number generator based on rotations from Bob Burtle. Maintains 16 bytes of state information. Good speed and randomness (see Burtle3rot for better randomness). Algorithm from http://burtleburtle.net/bob/rand/

Companion
object
Companion
class
final
class BurtleRot3(_a: Int, _b: Int, _c: Int, _d: Int) extends BurtleRot32

Bit-mixing random number generator based on rotations from Bob Burtle. Maintains 16 bytes of state information. Decent speed and very good randomness (see Burtle2rot for better speed). Algorithm from http://burtleburtle.net/bob/rand/

Bit-mixing random number generator based on rotations from Bob Burtle. Maintains 16 bytes of state information. Decent speed and very good randomness (see Burtle2rot for better speed). Algorithm from http://burtleburtle.net/bob/rand/

Companion
object
Companion
class
abstract
class BurtleRot32(_a: Int, _b: Int, _c: Int, _d: Int) extends IntBasedGenerator

Bit-mixing random number generator based on rotations from Bob Burtle. Maintains 16 bytes of state information. Algorithm from http://burtleburtle.net/bob/rand/

Bit-mixing random number generator based on rotations from Bob Burtle. Maintains 16 bytes of state information. Algorithm from http://burtleburtle.net/bob/rand/

final
class Cmwc5(_x: Long, _y: Long, _z: Long, _w: Long, _v: Long) extends LongBasedGenerator
Companion
object
object Cmwc5 extends GeneratorCompanion[Cmwc5, Array[Long]]
Companion
class
class CycledFile(f: File) extends Generator
Companion
object
object CycledFile
Companion
class
class Device(f: File) extends Generator
Companion
object
object Device
Companion
class
class Lcg32(seed0: Int) extends IntBasedGenerator
Companion
object
object Lcg32 extends GeneratorCompanion[Lcg32, Int]
Companion
class
final
class Lcg64(_seed: Long) extends LongBasedGenerator
Companion
object
object Lcg64 extends GeneratorCompanion[Lcg64, Long]
Companion
class
class Marsaglia32a6(_x: Int, _y: Int, _z: Int, _w: Int, _v: Int, _d: Int) extends IntBasedGenerator

Marsaglia "Weyl sequence" RNG with cycle length of 2^192^ - 2^32^ from http://www.jstatsoft.org/v08/i14/paper. Quite fast and quite random; requires 24 bytes of state.

Marsaglia "Weyl sequence" RNG with cycle length of 2^192^ - 2^32^ from http://www.jstatsoft.org/v08/i14/paper. Quite fast and quite random; requires 24 bytes of state.

Companion
object
object Marsaglia32a6 extends GeneratorCompanion[Marsaglia32a6, Array[Int]]
Companion
class

This is a 32-bit Scala implementation of MersenneTwister based on MT19937.c.

This is a 32-bit Scala implementation of MersenneTwister based on MT19937.c.

MersenneTwister is a fast, 623-dimensionally equidistributed pseudo random number generator with a 219937 - 1 long period.

Reference: Makoto Matsumoto and Takuji Nishimura: "Mersenne Twister: A 623-Dimensionally Equidistributed Uniform Pseudo-Random Number Generator", ACM Transactions on Modeling and Computer Simulation, Vol. 8, No. 1, January 1998, pp 3--30.

See also
Companion
object
object MersenneTwister32 extends GeneratorCompanion[MersenneTwister32, (Array[Int], Int)]
Companion
class

This is a 64-bit Scala implementation of MersenneTwister based on MT19937-64.c.

This is a 64-bit Scala implementation of MersenneTwister based on MT19937-64.c.

MersenneTwister is a fast, 623-dimensionally equidistributed pseudo random number generator with a 219937 - 1 long period.

Reference: Makoto Matsumoto and Takuji Nishimura: "Mersenne Twister: A 623-Dimensionally Equidistributed Uniform Pseudo-Random Number Generator", ACM Transactions on Modeling and Computer Simulation, Vol. 8, No. 1, January 1998, pp 3--30.

See also
Companion
object
object MersenneTwister64 extends GeneratorCompanion[MersenneTwister64, (Array[Long], Int)]
Companion
class
case
class PcgSeed64(initState: Long, initSeq: Long)

This is a Scala implementation of the PCG-XSH-RR-64/32 PRNG based on basic C implementation.

This is a Scala implementation of the PCG-XSH-RR-64/32 PRNG based on basic C implementation.

Reference: Melissa E. O'Neill: "PCG: A Family of Simple Fast Space-Efficient Statistically Good Algorithms for Random Number Generation", Submitted to ACM Transactions on Mathematical Software.

See also
Companion
object
class SecureJava(rand: SecureRandom) extends IntBasedGenerator
Companion
object
object SecureJava
Companion
class
final
class Serial(seed0: Long) extends LongBasedGenerator
Companion
object
object Serial extends GeneratorCompanion[Serial, Long]
Companion
class
final
class SyncGenerator(gen: Generator) extends Generator
Companion
object
Companion
class
object Utils

This object provides helper functions used for seeding arrays of integers or longs.

This object provides helper functions used for seeding arrays of integers or longs.

The seeding functions are an adaptation/port of code from the the 32-bit and 64-bit implementations of MersenneTwister (MT19937.c, MT19937-64.c).

MersenneTwister is a fast, 623-dimensionally equidistributed pseudo random number generator with a 219937 - 1 long period.

Reference: Makato Matsumoto and Takuji Nishimura: "Mersenne Twister: A 623-Dimensionally Equidistributed Uniform Pseudo-Random Number Generator", ACM Transactions on Modeling and Computer Simulation, Vol. 8, No. 1, January 1998, pp 3--30.

See also
final

This is a Scala implementation of the Well1024a PRNG based on WELL1024a.c.

This is a Scala implementation of the Well1024a PRNG based on WELL1024a.c.

The acronym WELL stands for Well Equidistributed Long-period Linear.

Reference: François Panneton, Pierre L'Ecuyer and Makoto Matsumoto: "Improved Long-Period Generators Based on Linear Recurrences Modulo 2", ACM Transactions on Mathematical Software, Vol. 32, No. 1, January 2006, pp 1--16.

See also
Companion
object
object Well1024a extends GeneratorCompanion[Well1024a, (Array[Int], Int)]
Companion
class
final

This is a Scala implementation of the Well19937a PRNG based on WELL19937a.c.

This is a Scala implementation of the Well19937a PRNG based on WELL19937a.c.

The acronym WELL stands for Well Equidistributed Long-period Linear.

Reference: François Panneton, Pierre L'Ecuyer and Makoto Matsumoto: "Improved Long-Period Generators Based on Linear Recurrences Modulo 2", ACM Transactions on Mathematical Software, Vol. 32, No. 1, January 2006, pp 1--16.

See also
Companion
object
object Well19937a extends GeneratorCompanion[Well19937a, (Array[Int], Int)]
Companion
class
final

This is a Scala implementation of the Well19937c PRNG based on WELL19937a.c.

This is a Scala implementation of the Well19937c PRNG based on WELL19937a.c.

The acronym WELL stands for Well Equidistributed Long-period Linear.

Reference: François Panneton, Pierre L'Ecuyer and Makoto Matsumoto: "Improved Long-Period Generators Based on Linear Recurrences Modulo 2", ACM Transactions on Mathematical Software, Vol. 32, No. 1, January 2006, pp 1--16.

See also
Companion
object
object Well19937c extends GeneratorCompanion[Well19937c, (Array[Int], Int)]
Companion
class
final

This is a Scala implementation of the Well44497a PRNG based on WELL44497a.c.

This is a Scala implementation of the Well44497a PRNG based on WELL44497a.c.

The acronym WELL stands for Well Equidistributed Long-period Linear.

Reference: François Panneton, Pierre L'Ecuyer and Makoto Matsumoto: "Improved Long-Period Generators Based on Linear Recurrences Modulo 2", ACM Transactions on Mathematical Software, Vol. 32, No. 1, January 2006, pp 1--16.

See also
Companion
object
object Well44497a extends GeneratorCompanion[Well44497a, (Array[Int], Int)]
Companion
class
final

This is a Scala implementation of the Well44497b PRNG based on WELL44497a.c.

This is a Scala implementation of the Well44497b PRNG based on WELL44497a.c.

The acronym WELL stands for Well Equidistributed Long-period Linear.

Reference: François Panneton, Pierre L'Ecuyer and Makoto Matsumoto: "Improved Long-Period Generators Based on Linear Recurrences Modulo 2", ACM Transactions on Mathematical Software, Vol. 32, No. 1, January 2006, pp 1--16.

See also
Companion
object
object Well44497b extends GeneratorCompanion[Well44497b, (Array[Int], Int)]
Companion
class
final

This is a Scala implementation of the Well512a PRNG based on WELL512a.c.

This is a Scala implementation of the Well512a PRNG based on WELL512a.c.

The acronym WELL stands for Well Equidistributed Long-period Linear.

Reference: François Panneton, Pierre L'Ecuyer and Makoto Matsumoto: "Improved Long-Period Generators Based on Linear Recurrences Modulo 2", ACM Transactions on Mathematical Software, Vol. 32, No. 1, January 2006, pp 1--16.

See also
Companion
object
object Well512a extends GeneratorCompanion[Well512a, (Array[Int], Int)]
Companion
class