pub struct Rng { /* private fields */ }Expand description
A SplitMix64 generator. Fast, good statistical quality, single-word state.
Implementations§
Source§impl Rng
impl Rng
Sourcepub fn split(seed: u64, id: u64) -> Self
pub fn split(seed: u64, id: u64) -> Self
Derives an independent generator for parallel stream id.
The child seed is mix_seed(seed, id), so different (seed, id)
pairs give non-overlapping sub-streams deterministically — the basis for
reproducible island/ensemble parallelism.
Sourcepub fn uniform_in(&mut self, lo: f64, hi: f64) -> f64
pub fn uniform_in(&mut self, lo: f64, hi: f64) -> f64
Uniform f64 in [lo, hi).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Rng
impl RefUnwindSafe for Rng
impl Send for Rng
impl Sync for Rng
impl Unpin for Rng
impl UnsafeUnpin for Rng
impl UnwindSafe for Rng
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