pub struct UniformDistribution<T> { /* private fields */ }Expand description
Generate random numbers with uniform distribution. It uses a seedable pseudo random number generator with deterministic output.
A seed is required to ensure a good level of entropy.
Trait Implementations§
Source§impl<T: Clone> Clone for UniformDistribution<T>
impl<T: Clone> Clone for UniformDistribution<T>
Source§fn clone(&self) -> UniformDistribution<T>
fn clone(&self) -> UniformDistribution<T>
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<T: Debug> Debug for UniformDistribution<T>
impl<T: Debug> Debug for UniformDistribution<T>
Source§impl<T: Default> Default for UniformDistribution<T>
impl<T: Default> Default for UniformDistribution<T>
Source§fn default() -> UniformDistribution<T>
fn default() -> UniformDistribution<T>
Returns the “default value” for a type. Read more
Source§impl<T> EntropyRules for UniformDistribution<T>
impl<T> EntropyRules for UniformDistribution<T>
Source§type EntropySeed = u64
type EntropySeed = u64
See EntropySeed.
Source§type EntropyModel = Lcg64Xsh32
type EntropyModel = Lcg64Xsh32
See EntropyModel.
Source§type EntropyOutput = T
type EntropyOutput = T
See EntropyOutput.
Source§fn generate_model(&self, seed: &Option<Self::EntropySeed>) -> Self::EntropyModel
fn generate_model(&self, seed: &Option<Self::EntropySeed>) -> Self::EntropyModel
Generates an
EntropyModel starting from an EntropySeed.Source§fn generate(
&self,
model: &mut Self::EntropyModel,
low: Self::EntropyOutput,
high: Self::EntropyOutput,
) -> Self::EntropyOutput
fn generate( &self, model: &mut Self::EntropyModel, low: Self::EntropyOutput, high: Self::EntropyOutput, ) -> Self::EntropyOutput
impl<T: Copy> Copy for UniformDistribution<T>
Auto Trait Implementations§
impl<T> Freeze for UniformDistribution<T>
impl<T> RefUnwindSafe for UniformDistribution<T>where
T: RefUnwindSafe,
impl<T> Send for UniformDistribution<T>where
T: Send,
impl<T> Sync for UniformDistribution<T>where
T: Sync,
impl<T> Unpin for UniformDistribution<T>where
T: Unpin,
impl<T> UnwindSafe for UniformDistribution<T>where
T: UnwindSafe,
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