pub struct SplitMix64 { /* private fields */ }Expand description
The SplitMix64 generator (Steele, Lea and Flood 2014).
Fast, with a full 2^64 period and good equidistribution for sampling. Not
cryptographically secure, which sampling does not need. Public so that callers of
update_belief and of Pomdp::step can
use the same reproducible sequence as the planners; it implements rand_core’s
generator traits.
use stochastic_search::{SplitMix64, unit_interval};
let mut rng = SplitMix64::new(7);
assert!((0.0..1.0).contains(&unit_interval(&mut rng)));Implementations§
Trait Implementations§
Source§impl Clone for SplitMix64
impl Clone for SplitMix64
Source§impl Debug for SplitMix64
impl Debug for SplitMix64
Source§impl TryRng for SplitMix64
impl TryRng for SplitMix64
Source§fn try_next_u32(&mut self) -> Result<u32, Infallible>
fn try_next_u32(&mut self) -> Result<u32, Infallible>
Return the next random
u32.Source§fn try_next_u64(&mut self) -> Result<u64, Infallible>
fn try_next_u64(&mut self) -> Result<u64, Infallible>
Return the next random
u64.Source§fn try_fill_bytes(&mut self, dst: &mut [u8]) -> Result<(), Infallible>
fn try_fill_bytes(&mut self, dst: &mut [u8]) -> Result<(), Infallible>
Fill
dst entirely with random data.Auto Trait Implementations§
impl Forget for SplitMix64
impl Freeze for SplitMix64
impl Move 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