Struct rand_distr::StandardNormal [−][src]
pub struct StandardNormal;
Samples floating-point numbers according to the normal distribution
N(0, 1)
(a.k.a. a standard normal, or Gaussian). This is equivalent to
Normal::new(0.0, 1.0)
but faster.
See Normal
for the general normal distribution.
Implemented via the ZIGNOR variant1 of the Ziggurat method.
Example
use rand::prelude::*; use rand_distr::StandardNormal; let val: f64 = thread_rng().sample(StandardNormal); println!("{}", val);
Jurgen A. Doornik (2005). An Improved Ziggurat Method to Generate Normal Random Samples. Nuffield College, Oxford ↩
Trait Implementations
impl Clone for StandardNormal
[src]
impl Clone for StandardNormal
[src]fn clone(&self) -> StandardNormal
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Distribution<f32> for StandardNormal
[src]
impl Distribution<f32> for StandardNormal
[src]impl Distribution<f64> for StandardNormal
[src]
impl Distribution<f64> for StandardNormal
[src]