abstract class Alea::PRNG
- Alea::PRNG
- Reference
- Object
Overview
PRNG is a replacement for the default Random::PCG32 stdlib prng that implements
the xoshiro algotithms to generate pseudo-random UInts in 64-bits.
Performance is comparable, but quality of generated Floats is much better.
Inherit this and implement #next_u, #next_f and #jump to build you own generator.
Direct Known Subclasses
Defined in:
alea/rand/rgen/prng.crInstance Method Summary
-
#next_f32 : Float32
Generate a uniform-distributed random
Float32in[0, 1). -
#next_f64 : Float64
Generate a uniform-distributed random
Float64in[0, 1). -
#next_i32 : Int32
Generate a uniform-distributed random
Int32in rangeInt32::MIN..Int32::MAX. -
#next_i64 : Int64
Generate a uniform-distributed random
Int64in rangeInt64::MIN..Int64::MAX. -
#next_u32 : UInt32
Must return an uniform-distributed
UInt32. -
#next_u64 : UInt64
Must return an uniform-distributed
UInt64.