pub struct SplitMix64 { /* private fields */ }
Expand description
The Rust imlementation of SplitMix64
algorithm. It is good
for generating seeds and good enough general purpose PRNG.
Implementations§
Source§impl SplitMix64
impl SplitMix64
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 PRNConcreteBoundedGenerator<SplitMix64> for f32
impl PRNConcreteBoundedGenerator<SplitMix64> for f32
Source§fn generate<TBounds: RangeBounds<Self>>(
generator: &mut SplitMix64,
range: TBounds,
) -> Self
fn generate<TBounds: RangeBounds<Self>>( generator: &mut SplitMix64, range: TBounds, ) -> Self
Generates a new pseudo random instance of itself in given range.
Source§impl PRNConcreteBoundedGenerator<SplitMix64> for f64
impl PRNConcreteBoundedGenerator<SplitMix64> for f64
Source§fn generate<TBounds: RangeBounds<Self>>(
generator: &mut SplitMix64,
range: TBounds,
) -> Self
fn generate<TBounds: RangeBounds<Self>>( generator: &mut SplitMix64, range: TBounds, ) -> Self
Generates a new pseudo random instance of itself in given range.
Source§impl PRNConcreteBoundedGenerator<SplitMix64> for i32
impl PRNConcreteBoundedGenerator<SplitMix64> for i32
Source§fn generate<TBounds: RangeBounds<Self>>(
generator: &mut SplitMix64,
range: TBounds,
) -> Self
fn generate<TBounds: RangeBounds<Self>>( generator: &mut SplitMix64, range: TBounds, ) -> Self
Generates a new pseudo random instance of itself in given range.
Source§impl PRNConcreteBoundedGenerator<SplitMix64> for i64
impl PRNConcreteBoundedGenerator<SplitMix64> for i64
Source§fn generate<TBounds: RangeBounds<Self>>(
generator: &mut SplitMix64,
range: TBounds,
) -> Self
fn generate<TBounds: RangeBounds<Self>>( generator: &mut SplitMix64, range: TBounds, ) -> Self
Generates a new pseudo random instance of itself in given range.
Source§impl PRNConcreteBoundedGenerator<SplitMix64> for u32
impl PRNConcreteBoundedGenerator<SplitMix64> for u32
Source§fn generate<TBounds: RangeBounds<Self>>(
generator: &mut SplitMix64,
range: TBounds,
) -> Self
fn generate<TBounds: RangeBounds<Self>>( generator: &mut SplitMix64, range: TBounds, ) -> Self
Generates a new pseudo random instance of itself in given range.
Source§impl PRNConcreteBoundedGenerator<SplitMix64> for u64
impl PRNConcreteBoundedGenerator<SplitMix64> for u64
Source§fn generate<TBounds: RangeBounds<Self>>(
generator: &mut SplitMix64,
range: TBounds,
) -> Self
fn generate<TBounds: RangeBounds<Self>>( generator: &mut SplitMix64, range: TBounds, ) -> Self
Generates a new pseudo random instance of itself in given range.
Source§impl<const N: usize> PRNConcreteGenerator<SplitMix64> for [u8; N]
impl<const N: usize> PRNConcreteGenerator<SplitMix64> for [u8; N]
Source§fn generate(generator: &mut SplitMix64) -> Self
fn generate(generator: &mut SplitMix64) -> Self
Generates a new pseudo random instance of itself.
Source§impl PRNConcreteGenerator<SplitMix64> for bool
impl PRNConcreteGenerator<SplitMix64> for bool
Source§fn generate(generator: &mut SplitMix64) -> Self
fn generate(generator: &mut SplitMix64) -> Self
Generates a new pseudo random instance of itself.
Source§impl PRNConcreteGenerator<SplitMix64> for i32
impl PRNConcreteGenerator<SplitMix64> for i32
Source§fn generate(generator: &mut SplitMix64) -> Self
fn generate(generator: &mut SplitMix64) -> Self
Generates a new pseudo random instance of itself.
Source§impl PRNConcreteGenerator<SplitMix64> for i64
impl PRNConcreteGenerator<SplitMix64> for i64
Source§fn generate(generator: &mut SplitMix64) -> Self
fn generate(generator: &mut SplitMix64) -> Self
Generates a new pseudo random instance of itself.
Source§impl PRNConcreteGenerator<SplitMix64> for i8
impl PRNConcreteGenerator<SplitMix64> for i8
Source§fn generate(generator: &mut SplitMix64) -> Self
fn generate(generator: &mut SplitMix64) -> Self
Generates a new pseudo random instance of itself.
Source§impl PRNConcreteGenerator<SplitMix64> for u32
impl PRNConcreteGenerator<SplitMix64> for u32
Source§fn generate(generator: &mut SplitMix64) -> Self
fn generate(generator: &mut SplitMix64) -> Self
Generates a new pseudo random instance of itself.
Source§impl PRNConcreteGenerator<SplitMix64> for u64
impl PRNConcreteGenerator<SplitMix64> for u64
Source§fn generate(generator: &mut SplitMix64) -> Self
fn generate(generator: &mut SplitMix64) -> Self
Generates a new pseudo random instance of itself.
Source§impl PRNConcreteGenerator<SplitMix64> for u8
impl PRNConcreteGenerator<SplitMix64> for u8
Source§fn generate(generator: &mut SplitMix64) -> Self
fn generate(generator: &mut SplitMix64) -> Self
Generates a new pseudo random instance of itself.
Source§impl PRNGenerator for SplitMix64
impl PRNGenerator for SplitMix64
Source§unsafe fn fill_raw(&mut self, dst_ptr: *mut u8, dst_len: usize)
unsafe fn fill_raw(&mut self, dst_ptr: *mut u8, dst_len: usize)
Fills the given raw buffer with randomness. Read more
Source§fn generate<T>(&mut self) -> Twhere
T: PRNConcreteGenerator<Self>,
fn generate<T>(&mut self) -> Twhere
T: PRNConcreteGenerator<Self>,
Generates pseudo random instance of given type if supported.
This function should support at least i32, u32, i64 and u64
types.
Source§fn generate_in_range<T, TBounds: RangeBounds<T>>(&mut self, range: TBounds) -> Twhere
T: PRNConcreteBoundedGenerator<Self>,
fn generate_in_range<T, TBounds: RangeBounds<T>>(&mut self, range: TBounds) -> Twhere
T: PRNConcreteBoundedGenerator<Self>,
Generates a pseudo random number in given range, if supported.
Source§impl PartialEq for SplitMix64
impl PartialEq for SplitMix64
Source§impl ReprC for SplitMix64
impl ReprC for SplitMix64
Source§impl Seedable<u64> for SplitMix64
impl Seedable<u64> for SplitMix64
impl Copy for SplitMix64
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 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