XorOshiro128Plus¶
This is an implementation of xoroshiro128+, as detailed at:
http://xoroshiro.di.unimi.it
This is currently the default Rand implementation.
Implements¶
- Random ref
Constructors¶
from_u64¶
Use seed x to seed a SplitMix64 and use this to initialize the 128 bits of state.
Parameters¶
- x: U64 val = 5489
Returns¶
- XorOshiro128Plus ref^
create¶
Create with the specified seed. Returned values are deterministic for a given seed.
Parameters¶
Returns¶
- XorOshiro128Plus ref^
Public Functions¶
next¶
A random integer in [0, 2^64)
Returns¶
- U64 val
has_next¶
Returns¶
- Bool val
u8¶
Returns¶
- U8 val
u16¶
Returns¶
- U16 val
u32¶
Returns¶
- U32 val
u64¶
Returns¶
- U64 val
u128¶
Returns¶
- U128 val
ulong¶
Returns¶
- ULong val
usize¶
Returns¶
- USize val
i8¶
Returns¶
- I8 val
i16¶
Returns¶
- I16 val
i32¶
Returns¶
- I32 val
i64¶
Returns¶
- I64 val
i128¶
Returns¶
- I128 val
ilong¶
Returns¶
- ILong val
isize¶
Returns¶
- ISize val
int_fp_mult[optional N: ((U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val) & Real[N] 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
Parameters¶
- n: N
Returns¶
- N
int[optional N: ((U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val) & Real[N] val)]¶
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
Parameters¶
- n: N
Returns¶
- N
int_unbiased[optional N: ((U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val) & Real[N] val)]¶
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
Parameters¶
- n: N
Returns¶
- N
real¶
Returns¶
- F64 val
shuffle[A: A]¶
Parameters¶
- array: Array[A] ref
Returns¶
- None val