Struct rand::distributions::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 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::prelude::*;
use rand::distributions::StandardNormal;

let val: f64 = SmallRng::from_entropy().sample(StandardNormal);
println!("{}", val);

Trait Implementations

impl Clone for StandardNormal
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Copy for StandardNormal
[src]

impl Debug for StandardNormal
[src]

[src]

Formats the value using the given formatter. Read more

impl Distribution<f64> for StandardNormal
[src]

[src]

Generate a random value of T, using rng as the source of randomness.

Important traits for DistIter<'a, D, R, T>
[src]

Create an iterator that generates random values of T, using rng as the source of randomness. Read more

Auto Trait Implementations