Struct rv::dist::Poisson[][src]

pub struct Poisson {
    pub rate: f64,
}

Possion distribution on unisgned integers

Example

extern crate rv;
extern crate rand;

use rv::prelude::*;

// Create Possion(λ=5.3)
let pois = Poisson::new(5.3).unwrap();

// CDF at 5
assert!((pois.cdf(&5_u16) - 0.56347339228807169).abs() < 1E-12);

// Draw 100 samples
let mut rng = rand::thread_rng();
let xs: Vec<u32> = pois.sample(100, &mut rng);
assert_eq!(xs.len(), 100)

Fields

Methods

impl Poisson
[src]

Trait Implementations

impl Clone for Poisson
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Poisson
[src]

Formats the value using the given formatter. Read more

impl Mean<f64> for Poisson
[src]

Returns None if the mean is undefined

impl Variance<f64> for Poisson
[src]

Returns None if the variance is undefined

impl Skewness for Poisson
[src]

impl Kurtosis for Poisson
[src]

impl Rv<u16> for Poisson
[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

Multiple draws of 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

impl Support<u16> for Poisson
[src]

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

impl DiscreteDistr<u16> for Poisson
[src]

Probability mass function (PMF) at x Read more

Natural logarithm of the probability mass function (PMF) Read more

impl Cdf<u16> for Poisson
[src]

The value of the Cumulative Density Function at x Read more

Survival function, 1 - CDF(x)

impl Rv<u32> for Poisson
[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

Multiple draws of 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

impl Support<u32> for Poisson
[src]

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

impl DiscreteDistr<u32> for Poisson
[src]

Probability mass function (PMF) at x Read more

Natural logarithm of the probability mass function (PMF) Read more

impl Cdf<u32> for Poisson
[src]

The value of the Cumulative Density Function at x Read more

Survival function, 1 - CDF(x)

Auto Trait Implementations

impl Send for Poisson

impl Sync for Poisson