pub struct StandardNormal(pub f64);Expand description
A wrapper around an f64 to generate N(0, 1) random numbers
(a.k.a. a standard normal, or Gaussian).
See Normal for the general normal distribution.
Implemented via the ZIGNOR variant[1] of the Ziggurat method.
[1]: Jurgen A. Doornik (2005). An Improved Ziggurat Method to Generate Normal Random Samples. Nuffield College, Oxford
§Example
use rand::distributions::normal::StandardNormal;
let StandardNormal(x) = rand::random();
println!("{}", x);Tuple Fields§
§0: f64Trait Implementations§
Source§impl Clone for StandardNormal
impl Clone for StandardNormal
Source§fn clone(&self) -> StandardNormal
fn clone(&self) -> StandardNormal
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for StandardNormal
Source§impl Debug for StandardNormal
impl Debug for StandardNormal
Source§impl Rand for StandardNormal
impl Rand for StandardNormal
Auto Trait Implementations§
impl Freeze for StandardNormal
impl RefUnwindSafe for StandardNormal
impl Send for StandardNormal
impl Sync for StandardNormal
impl Unpin for StandardNormal
impl UnsafeUnpin for StandardNormal
impl UnwindSafe for StandardNormal
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> Erased for T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more