XorOshiro128StarStar¶
This is an implementation of xoroshiro128**, as detailed at:
http://xoshiro.di.unimi.it/
This Rand implementation is slightly slower than XorOshiro128Plus but does not exhibit "mild dependencies in Hamming weights" (the lower four bits might fail linearity tests).
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¶
- XorOshiro128StarStar ref^
create¶
Parameters¶
Returns¶
- XorOshiro128StarStar ref^
Public Functions¶
next¶
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