pub struct SplitMix64 { /* private fields */ }Expand description
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.
Implementations§
Source§impl SplitMix64
impl SplitMix64
Sourcepub fn state(&self) -> [u8; 8]
pub fn state(&self) -> [u8; 8]
Return the internal state of the generator as little-endian bytes
that can be passed to SeedableRng::from_seed to reconstruct an
identical generator.
Trait Implementations§
Source§impl Clone for SplitMix64
impl Clone for SplitMix64
Source§fn clone(&self) -> SplitMix64
fn clone(&self) -> SplitMix64
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SplitMix64
impl Debug for SplitMix64
Source§impl PartialEq for SplitMix64
impl PartialEq for SplitMix64
Source§impl SeedableRng for SplitMix64
impl SeedableRng for SplitMix64
Source§fn seed_from_u64(seed: u64) -> SplitMix64
fn seed_from_u64(seed: u64) -> SplitMix64
Seed a SplitMix64 from a u64.
Source§type Seed = [u8; 8]
type Seed = [u8; 8]
Seed type, which is restricted to types mutably-dereferenceable as
u8
arrays (we recommend [u8; N] for some N). Read moreSource§fn from_rng<R>(rng: &mut R) -> Self
fn from_rng<R>(rng: &mut R) -> Self
Create a new PRNG seeded from an infallible
Rng. Read moreSource§impl TryRng for SplitMix64
impl TryRng for SplitMix64
Source§type Error = Infallible
type Error = Infallible
The type returned in the event of a RNG error. Read more
impl Eq for SplitMix64
impl StructuralPartialEq for SplitMix64
Auto Trait Implementations§
impl Freeze for SplitMix64
impl RefUnwindSafe for SplitMix64
impl Send for SplitMix64
impl Sync for SplitMix64
impl Unpin for SplitMix64
impl UnsafeUnpin for SplitMix64
impl UnwindSafe for SplitMix64
Blanket Implementations§
Source§impl<R> TryRngCore for Rwhere
R: TryRng,
impl<R> TryRngCore for Rwhere
R: TryRng,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more