pub struct Xoshiro512Plus { /* fields omitted */ }
A xoshiro512+ random number generator.
The xoshiro512+ algorithm is not suitable for cryptographic purposes, but
is very fast and has good statistical properties, besides a low linear
complexity in the lowest bits.
The algorithm used here is translated from the xoshiro512plus.c
reference source code by
David Blackman and Sebastiano Vigna.
Seed a Xoshiro512Plus
from a u64
using SplitMix64
.
Jump forward, equivalently to 2^256 calls to next_u64()
.
This can be used to generate 2^256 non-overlapping subsequences for
parallel computations.
use rand::SeedableRng;
use xoshiro::Xoshiro512Plus;
let rng1 = Xoshiro512Plus::from_seed_u64(0);
let mut rng2 = rng1.clone();
rng2.jump();
let mut rng3 = rng2.clone();
rng3.jump();
Performs copy-assignment from source
. Read more
Formats the value using the given formatter. Read more
Fill dest
entirely with random data. Read more
Seed type, which is restricted to types mutably-dereferencable as u8
arrays (we recommend [u8; N]
for some N
). Read more
Create a new Xoshiro512Plus
. If seed
is entirely 0, it will be
mapped to a different seed.
Create a new PRNG using a u64
seed. Read more
Create a new PRNG seeded from another Rng
. Read more
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static