A Mersenne Twister. This is a non-cryptographic random number generator. This should only be used for legacy applications that require a Mersenne Twister, otherwise use Rand.
class ref MT is Random ref
Create with the specified seed. Returned values are deterministic for a given seed.
new ref create( x: U64 val = 5489, y: U64 val = 0) : MT ref^
A random integer in [0, 2^64)
fun ref next() : U64 val
fun tag has_next() : Bool val
fun ref u8() : U8 val
fun ref u16() : U16 val
fun ref u32() : U32 val
fun ref u64() : U64 val
fun ref u128() : U128 val
fun ref ulong() : ULong val
fun ref usize() : USize val
fun ref i8() : I8 val
fun ref i16() : I16 val
fun ref i32() : I32 val
fun ref i64() : I64 val
fun ref i128() : I128 val
fun ref ilong() : ILong val
fun ref isize() : ISize val
fun ref int_fp_mult[optional N: ((U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val) & Real[N] val)]( n: N) : N
fun ref int[optional N: ((U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val) & Real[N] val)]( n: N) : N
fun ref int_unbiased[optional N: ((U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val) & Real[N] val)]( n: N) : N
fun ref real() : F64 val
fun ref shuffle[A: A]( array: Array[A] ref) : None val
Repopulates the state array.
fun ref _populate() : None val
fun tag _n() : USize val
fun tag _m() : USize val
fun tag _n1() : USize val
fun tag _mask( x: U64 val, y: U64 val) : U64 val
fun tag _matrix( x: U64 val) : U64 val
fun tag _mix( x: U64 val, y: U64 val) : U64 val
fun ref _lower( i: USize val, x: U64 val) : U64 val ?
fun ref _upper( i: USize val, x: U64 val) : U64 val ?
fun ref _wrap() : U64 val ?
fun ref _u64_unbiased( range: U64 val) : U64 val
© 2016-2018, The Pony Developers
© 2014-2015, Causality Ltd.
Licensed under the BSD 2-Clause License.
https://stdlib.ponylang.io/random-MT