Struct compute::distributions::Poisson[][src]

pub struct Poisson { /* fields omitted */ }
Expand description

Implements the Poisson distribution.

Implementations

Create a new Poisson distribution with rate parameter lambda.

Errors

Panics if lambda <= 0.0.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Calculates the probability mass function for the given Poisson distribution at k.

Samples from the given Poisson distribution. For lambda < 10.0, this is done with the direct (multiplication) method, and for lambda >= 10.0, this is done the PTRS transformed rejection method from Hoermann.

Update the parameters of the distribution.

Generates a vector of n randomly sampled values from the given probability distribution.

Generates a matrix of size n x m with values randomly sampled from the given distribution. Read more

Calculates the mean, which is given by the rate parameter.

Calculates the variance, which is given by the rate parameter.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.