Struct std::rand::distributions::Exp [] [src]

pub struct Exp {
    lambda_inverse: f64,
}
Unstable (rand)

: use rand from crates.io

The exponential distribution Exp(lambda).

This distribution has density function: f(x) = lambda * exp(-lambda * x) for x > 0.

Fields

lambda_inverse
Unstable (rand)

: use rand from crates.io

lambda stored as 1/lambda, since this is what we scale by.

Methods

impl Exp

fn new(lambda: f64) -> Exp

Unstable (rand)

: use rand from crates.io

Construct a new Exp with the given shape parameter lambda. Panics if lambda <= 0.

Trait Implementations

impl Sample<f64> for Exp

fn sample<R>(&mut self, rng: &mut R) -> f64 where R: Rng

impl IndependentSample<f64> for Exp

fn ind_sample<R>(&self, rng: &mut R) -> f64 where R: Rng

Derived Implementations

impl Clone for Exp

fn clone(&self) -> Exp

fn clone_from(&mut self, source: &Self)

impl Copy for Exp