Struct xoshiro::SplitMix64 [−][src]
pub struct SplitMix64 { /* fields omitted */ }
A splitmix64 random number generator.
The splitmix algorithm is not suitable for cryptographic purposes, but is very fast and has a 64 bit state.
The algorithm used here is translated from the splitmix64.c
reference source code by
Sebastiano Vigna. For next_u32
, a more efficient mixing function taken
from dsiutils
is used.
Methods
impl SplitMix64
[src]
impl SplitMix64
pub fn from_seed_u64(seed: u64) -> SplitMix64
[src]
pub fn from_seed_u64(seed: u64) -> SplitMix64
Seed a SplitMix64
from a u64
.
Trait Implementations
impl Debug for SplitMix64
[src]
impl Debug for SplitMix64
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for SplitMix64
[src]
impl Clone for SplitMix64
fn clone(&self) -> SplitMix64
[src]
fn clone(&self) -> SplitMix64
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl RngCore for SplitMix64
[src]
impl RngCore for SplitMix64
fn next_u32(&mut self) -> u32
[src]
fn next_u32(&mut self) -> u32
Return the next random u32
. Read more
fn next_u64(&mut self) -> u64
[src]
fn next_u64(&mut self) -> u64
Return the next random u64
. Read more
fn fill_bytes(&mut self, dest: &mut [u8])
[src]
fn fill_bytes(&mut self, dest: &mut [u8])
Fill dest
with random data. Read more
fn try_fill_bytes(&mut self, dest: &mut [u8]) -> Result<(), Error>
[src]
fn try_fill_bytes(&mut self, dest: &mut [u8]) -> Result<(), Error>
Fill dest
entirely with random data. Read more
impl SeedableRng for SplitMix64
[src]
impl SeedableRng for SplitMix64
type Seed = [u8; 8]
Seed type, which is restricted to types mutably-dereferencable as u8
arrays (we recommend [u8; N]
for some N
). Read more
fn from_seed(seed: [u8; 8]) -> SplitMix64
[src]
fn from_seed(seed: [u8; 8]) -> SplitMix64
Create a new SplitMix64
.
fn from_rng<R>(rng: R) -> Result<Self, Error> where
R: RngCore,
[src]
fn from_rng<R>(rng: R) -> Result<Self, Error> where
R: RngCore,
Create a new PRNG seeded from another Rng
. Read more
Auto Trait Implementations
impl Send for SplitMix64
impl Send for SplitMix64
impl Sync for SplitMix64
impl Sync for SplitMix64