Struct probability::prelude::Gamma [] [src]

pub struct Gamma {
    // some fields omitted
}

A gamma distribution.

Methods

impl Gamma
[src]

fn new(k: f64, theta: f64) -> Self

Create a gamma distribution with shape parameter k and scale parameter theta.

It should hold that k > 0 and theta > 0.

fn k(&self) -> f64

Return the shape parameter.

fn theta(&self) -> f64

Return the scale parameter.

Trait Implementations

impl Copy for Gamma
[src]

impl Clone for Gamma
[src]

fn clone(&self) -> Gamma

Returns a copy of the value. Read more

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

Performs copy-assignment from source. Read more

impl Continuous for Gamma
[src]

fn density(&self, x: f64) -> f64

Compute the probability density function.

impl Distribution for Gamma
[src]

type Value = f64

The type of outcomes.

fn distribution(&self, x: f64) -> f64

Compute the cumulative distribution function.

impl Entropy for Gamma
[src]

fn entropy(&self) -> f64

Compute the differential entropy. Read more

impl Kurtosis for Gamma
[src]

fn kurtosis(&self) -> f64

Compute the excess kurtosis.

impl Mean for Gamma
[src]

fn mean(&self) -> f64

Compute the expected value.

impl Modes for Gamma
[src]

fn modes(&self) -> Vec<f64>

Compute the modes.

impl Sample for Gamma
[src]

fn sample<S>(&self, source: &mut S) -> f64 where S: Source

Draw a sample.

References

  1. G. Marsaglia and W. W. Tsang, “A simple method for generating gamma variables,” ACM Transactions on Mathematical Software, vol. 26, no. 3, pp. 363–372, September 2000.

impl Skewness for Gamma
[src]

fn skewness(&self) -> f64

Compute the skewness.

impl Variance for Gamma
[src]

fn variance(&self) -> f64

Compute the variance.

fn deviation(&self) -> f64

Compute the standard deviation.