[][src]Struct rv::dist::InvGamma

pub struct InvGamma { /* fields omitted */ }

Inverse gamma distribution IG(α, β) over x in (0, ∞).

            β^α
f(x|α, β) = ----  x^(-α-1) e^(-β/x)
            Γ(α)

Methods

impl InvGamma[src]

pub fn set_shape(&mut self, val: f64) -> &mut Self[src]

pub fn set_scale(&mut self, val: f64) -> &mut Self[src]

impl InvGamma[src]

pub fn new(shape: f64, scale: f64) -> Result<Self, InvGammaError>[src]

Create a new Gamma distribution with shape (α) and rate (β).

Arguments

  • shape: shape parameter, α
  • scale scale parameter, β

pub fn new_unchecked(shape: f64, scale: f64) -> Self[src]

Creates a new InvGamma without checking whether the parameters are valid.

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

Get the shape paramter

Example

let ig = InvGamma::new(1.0, 2.0).unwrap();
assert_eq!(ig.shape(), 1.0);

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

Get the scale paramter

Example

let ig = InvGamma::new(1.0, 2.0).unwrap();
assert_eq!(ig.scale(), 2.0);

Trait Implementations

impl Cdf<f32> for InvGamma[src]

impl Cdf<f64> for InvGamma[src]

impl Clone for InvGamma[src]

impl ContinuousDistr<f32> for InvGamma[src]

impl ContinuousDistr<f64> for InvGamma[src]

impl Debug for InvGamma[src]

impl Default for InvGamma[src]

impl Display for InvGamma[src]

impl Entropy for InvGamma[src]

impl<'_> From<&'_ InvGamma> for String[src]

impl Kurtosis for InvGamma[src]

impl Mean<f32> for InvGamma[src]

impl Mean<f64> for InvGamma[src]

impl Mode<f32> for InvGamma[src]

impl Mode<f64> for InvGamma[src]

impl PartialEq<InvGamma> for InvGamma[src]

impl PartialOrd<InvGamma> for InvGamma[src]

impl Rv<f32> for InvGamma[src]

impl Rv<f64> for InvGamma[src]

impl Skewness for InvGamma[src]

impl StructuralPartialEq for InvGamma[src]

impl Support<f32> for InvGamma[src]

impl Support<f64> for InvGamma[src]

impl Variance<f64> for InvGamma[src]

Auto Trait Implementations

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<Fx, X> Cdf<X> for Fx where
    Fx: Deref,
    <Fx as Deref>::Target: Cdf<X>, 
[src]

impl<Fx, X> ContinuousDistr<X> for Fx where
    Fx: Deref,
    <Fx as Deref>::Target: ContinuousDistr<X>, 
[src]

impl<Fx> Entropy for Fx where
    Fx: Deref,
    <Fx as Deref>::Target: Entropy
[src]

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

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

impl<Fx> Kurtosis for Fx where
    Fx: Deref,
    <Fx as Deref>::Target: Kurtosis
[src]

impl<Fx, X> Mean<X> for Fx where
    Fx: Deref,
    <Fx as Deref>::Target: Mean<X>, 
[src]

impl<Fx, X> Mode<X> for Fx where
    Fx: Deref,
    <Fx as Deref>::Target: Mode<X>, 
[src]

impl<Fx, X> Rv<X> for Fx where
    Fx: Deref,
    <Fx as Deref>::Target: Rv<X>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<Fx> Skewness for Fx where
    Fx: Deref,
    <Fx as Deref>::Target: Skewness
[src]

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

impl<Fx, X> Support<X> for Fx where
    Fx: Deref,
    <Fx as Deref>::Target: Support<X>, 
[src]

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

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<Fx, X> Variance<X> for Fx where
    Fx: Deref,
    <Fx as Deref>::Target: Variance<X>, 
[src]