pub struct SplitMix64 { /* private fields */ }Expand description
A deterministic 64-bit stream. Cheap enough to make one per request.
Implementations§
Source§impl SplitMix64
impl SplitMix64
pub fn new(seed: u64) -> SplitMix64
Sourcepub fn derive(seed: u64, label: &str) -> SplitMix64
pub fn derive(seed: u64, label: &str) -> SplitMix64
Derive an independent stream from this one and a label, so two features
seeded from the same run never correlate. (hash is FNV-1a, also here,
also for stream stability.)
pub fn next_u64(&mut self) -> u64
Trait Implementations§
Source§impl Clone for SplitMix64
impl Clone 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<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