Struct rv::dist::InvChiSquared[][src]

pub struct InvChiSquared { /* fields omitted */ }

Χ-2 distribution Χ-2(v).

Example

use rv::prelude::*;

let ix2 = InvChiSquared::new(2.0).unwrap();

Implementations

impl InvChiSquared[src]

pub fn new(v: f64) -> Result<Self, InvChiSquaredError>[src]

Create a new Inverse Chi-squared distribution

Arguments

  • v: Degrees of freedom in (0, ∞)

pub fn new_unchecked(v: f64) -> Self[src]

Create a new InvChiSquared without checking whether the parameters are valid.

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

Get the degrees of freedom, v.

Example

let ix2 = InvChiSquared::new(1.2).unwrap();
assert_eq!(ix2.v(), 1.2);

pub fn set_v(&mut self, v: f64) -> Result<(), InvChiSquaredError>[src]

Set the degrees of freedom, k.

Example

let mut ix2 = InvChiSquared::new(1.2).unwrap();

ix2.set_v(2.2).unwrap();
assert_eq!(ix2.v(), 2.2);

Will error given invalid values.

assert!(ix2.set_v(2.2).is_ok());
assert!(ix2.set_v(0.0).is_err());
assert!(ix2.set_v(-1.0).is_err());
assert!(ix2.set_v(std::f64::NAN).is_err());
assert!(ix2.set_v(std::f64::INFINITY).is_err());

pub fn set_v_unchecked(&mut self, v: f64)[src]

Trait Implementations

impl Cdf<f32> for InvChiSquared[src]

impl Cdf<f64> for InvChiSquared[src]

impl Clone for InvChiSquared[src]

impl ContinuousDistr<f32> for InvChiSquared[src]

impl ContinuousDistr<f64> for InvChiSquared[src]

impl Debug for InvChiSquared[src]

impl Display for InvChiSquared[src]

impl Kurtosis for InvChiSquared[src]

impl Mean<f32> for InvChiSquared[src]

impl Mean<f64> for InvChiSquared[src]

impl Mode<f32> for InvChiSquared[src]

impl Mode<f64> for InvChiSquared[src]

impl PartialEq<InvChiSquared> for InvChiSquared[src]

impl Rv<f32> for InvChiSquared[src]

impl Rv<f64> for InvChiSquared[src]

impl Skewness for InvChiSquared[src]

impl Support<f32> for InvChiSquared[src]

impl Support<f64> for InvChiSquared[src]

impl Variance<f32> for InvChiSquared[src]

impl Variance<f64> for InvChiSquared[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<T> From<T> for T[src]

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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

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>,