Struct rv::dist::Laplace[][src]

pub struct Laplace { /* fields omitted */ }

Laplace, or double exponential, distribution

Example

extern crate rand;

use rv::prelude::*;

let laplace = Laplace::new(0.0, 1.0).expect("Invalid params");

// 100 draws from Laplace
let mut rng = rand::thread_rng();
let xs: Vec<f64> = laplace.sample(100, &mut rng);
assert_eq!(xs.len(), 100);

Methods

impl Laplace
[src]

Trait Implementations

impl Clone for Laplace
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Laplace
[src]

Formats the value using the given formatter. Read more

impl Default for Laplace
[src]

Laplace with mean 0 and variance 1

Returns the "default value" for a type. Read more

impl Skewness for Laplace
[src]

impl Kurtosis for Laplace
[src]

impl Entropy for Laplace
[src]

The entropy, H(X)

impl Rv<f64> for Laplace
[src]

Un-normalized probability function Read more

The log of the constant term in the PDF/PMF. Should not be a function of any of the parameters. Read more

Single draw from the Rv Read more

Un-normalized probability function Read more

The constant term in the PDF/PMF. Should not be a function of any of the parameters. Read more

Multiple draws of the Rv Read more

impl Support<f64> for Laplace
[src]

Returns true if x is in the support of the Rv Read more

impl ContinuousDistr<f64> for Laplace
[src]

The value of the Probability Density Function (PDF) at x Read more

The value of the log Probability Density Function (PDF) at x Read more

impl Cdf<f64> for Laplace
[src]

The value of the Cumulative Density Function at x Read more

Survival function, 1 - CDF(x)

impl Mean<f64> for Laplace
[src]

Returns None if the mean is undefined

impl Median<f64> for Laplace
[src]

Returns None if the median is undefined

impl Mode<f64> for Laplace
[src]

Returns None if the mode is undefined or is not a single value

impl Variance<f64> for Laplace
[src]

Returns None if the variance is undefined

impl Rv<f32> for Laplace
[src]

Un-normalized probability function Read more

The log of the constant term in the PDF/PMF. Should not be a function of any of the parameters. Read more

Single draw from the Rv Read more

Un-normalized probability function Read more

The constant term in the PDF/PMF. Should not be a function of any of the parameters. Read more

Multiple draws of the Rv Read more

impl Support<f32> for Laplace
[src]

Returns true if x is in the support of the Rv Read more

impl ContinuousDistr<f32> for Laplace
[src]

The value of the Probability Density Function (PDF) at x Read more

The value of the log Probability Density Function (PDF) at x Read more

impl Cdf<f32> for Laplace
[src]

The value of the Cumulative Density Function at x Read more

Survival function, 1 - CDF(x)

impl Mean<f32> for Laplace
[src]

Returns None if the mean is undefined

impl Median<f32> for Laplace
[src]

Returns None if the median is undefined

impl Mode<f32> for Laplace
[src]

Returns None if the mode is undefined or is not a single value

impl Variance<f32> for Laplace
[src]

Returns None if the variance is undefined

Auto Trait Implementations

impl Send for Laplace

impl Sync for Laplace