[][src]Struct rv::dist::Exponential

pub struct Exponential { /* fields omitted */ }

Exponential distribution, Exp(λ) over x in [0, ∞).

Examples

Compute 50% confidence interval

use rv::prelude::*;

let expon = Exponential::new(1.5).unwrap();
let interval: (f64, f64) = expon.interval(0.5);  // (0.19, 0.92)

Methods

impl Exponential[src]

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

λ > 0, rate or inverse scale

impl Exponential[src]

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

Create a new exponential distribution

Arguments

  • rate: λ > 0, rate or inverse scale

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

Creates a new Exponential without checking whether the parameter is valid.

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

Get the rate parameter

Example

let expon = Exponential::new(1.3).unwrap();
assert_eq!(expon.rate(), 1.3);

Trait Implementations

impl Cdf<f32> for Exponential[src]

impl Cdf<f64> for Exponential[src]

impl Clone for Exponential[src]

impl ContinuousDistr<f32> for Exponential[src]

impl ContinuousDistr<f64> for Exponential[src]

impl Debug for Exponential[src]

impl Display for Exponential[src]

impl Entropy for Exponential[src]

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

impl InverseCdf<f32> for Exponential[src]

impl InverseCdf<f64> for Exponential[src]

impl KlDivergence for Exponential[src]

impl Kurtosis for Exponential[src]

impl Mean<f32> for Exponential[src]

impl Mean<f64> for Exponential[src]

impl Median<f32> for Exponential[src]

impl Median<f64> for Exponential[src]

impl Mode<f32> for Exponential[src]

impl Mode<f64> for Exponential[src]

impl PartialEq<Exponential> for Exponential[src]

impl PartialOrd<Exponential> for Exponential[src]

impl Rv<f32> for Exponential[src]

impl Rv<f64> for Exponential[src]

impl Skewness for Exponential[src]

impl StructuralPartialEq for Exponential[src]

impl Support<f32> for Exponential[src]

impl Support<f64> for Exponential[src]

impl Variance<f32> for Exponential[src]

impl Variance<f64> for Exponential[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, X> InverseCdf<X> for Fx where
    Fx: Deref,
    <Fx as Deref>::Target: InverseCdf<X>, 
[src]

impl<Fx> KlDivergence for Fx where
    Fx: Deref,
    <Fx as Deref>::Target: KlDivergence
[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> Median<X> for Fx where
    Fx: Deref,
    <Fx as Deref>::Target: Median<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]