Struct probability::distribution::Gamma[][src]

pub struct Gamma { /* fields omitted */ }

A gamma distribution.

Implementations

impl Gamma[src]

pub fn new(k: f64, theta: f64) -> Self[src]

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

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

pub fn k(&self) -> f64[src]

Return the shape parameter.

pub fn theta(&self) -> f64[src]

Return the scale parameter.

Trait Implementations

impl Clone for Gamma[src]

impl Continuous for Gamma[src]

impl Copy for Gamma[src]

impl Debug for Gamma[src]

impl Distribution for Gamma[src]

type Value = f64

The type of outcomes.

impl Entropy for Gamma[src]

impl Kurtosis for Gamma[src]

impl Mean for Gamma[src]

impl Modes for Gamma[src]

impl Sample for Gamma[src]

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

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]

impl Variance for Gamma[src]

Auto Trait Implementations

impl RefUnwindSafe for Gamma

impl Send for Gamma

impl Sync for Gamma

impl Unpin for Gamma

impl UnwindSafe for Gamma

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.