Struct rv::dist::Exponential [−][src]
pub struct Exponential { pub rate: f64, }
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)
Fields
rate: f64
λ > 0, rate or inverse scale
Methods
impl Exponential
[src]
impl Exponential
Trait Implementations
impl Debug for Exponential
[src]
impl Debug for Exponential
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for Exponential
[src]
impl Clone for Exponential
fn clone(&self) -> Exponential
[src]
fn clone(&self) -> Exponential
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Skewness for Exponential
[src]
impl Skewness for Exponential
impl Kurtosis for Exponential
[src]
impl Kurtosis for Exponential
impl Entropy for Exponential
[src]
impl Entropy for Exponential
impl KlDivergence for Exponential
[src]
impl KlDivergence for Exponential
fn kl(&self, other: &Self) -> f64
[src]
fn kl(&self, other: &Self) -> f64
The KL divergence, KL(P|Q) between this distribution, P, and another, Q Read more
fn kl_sym(&self, other: &Self) -> f64
[src]
fn kl_sym(&self, other: &Self) -> f64
Symmetrised divergence, KL(P|Q) + KL(Q|P) Read more
impl Rv<f64> for Exponential
[src]
impl Rv<f64> for Exponential
fn ln_f(&self, x: &f64) -> f64
[src]
fn ln_f(&self, x: &f64) -> f64
Un-normalized probability function Read more
fn ln_normalizer(&self) -> f64
[src]
fn ln_normalizer(&self) -> f64
The log of the constant term in the PDF/PMF. Should not be a function of any of the parameters. Read more
fn draw<R: Rng>(&self, rng: &mut R) -> f64
[src]
fn draw<R: Rng>(&self, rng: &mut R) -> f64
Single draw from the Rv
Read more
fn sample<R: Rng>(&self, n: usize, rng: &mut R) -> Vec<f64>
[src]
fn sample<R: Rng>(&self, n: usize, rng: &mut R) -> Vec<f64>
Multiple draws of the Rv
Read more
fn f(&self, x: &X) -> f64
[src]
fn f(&self, x: &X) -> f64
Un-normalized probability function Read more
fn normalizer(&self) -> f64
[src]
fn normalizer(&self) -> f64
The constant term in the PDF/PMF. Should not be a function of any of the parameters. Read more
impl Support<f64> for Exponential
[src]
impl Support<f64> for Exponential
impl ContinuousDistr<f64> for Exponential
[src]
impl ContinuousDistr<f64> for Exponential
fn pdf(&self, x: &X) -> f64
[src]
fn pdf(&self, x: &X) -> f64
The value of the Probability Density Function (PDF) at x
Read more
fn ln_pdf(&self, x: &X) -> f64
[src]
fn ln_pdf(&self, x: &X) -> f64
The value of the log Probability Density Function (PDF) at x
Read more
impl Cdf<f64> for Exponential
[src]
impl Cdf<f64> for Exponential
fn cdf(&self, x: &f64) -> f64
[src]
fn cdf(&self, x: &f64) -> f64
The value of the Cumulative Density Function at x
Read more
fn sf(&self, x: &X) -> f64
[src]
fn sf(&self, x: &X) -> f64
Survival function, 1 - CDF(x)
impl InverseCdf<f64> for Exponential
[src]
impl InverseCdf<f64> for Exponential
fn invcdf(&self, p: f64) -> f64
[src]
fn invcdf(&self, p: f64) -> f64
The value of the x
at the given probability in the CDF Read more
fn quantile(&self, p: f64) -> X
[src]
fn quantile(&self, p: f64) -> X
Alias for invcdf
fn interval(&self, p: f64) -> (X, X)
[src]
fn interval(&self, p: f64) -> (X, X)
Interval containing p
proportion for the probability Read more
impl Mean<f64> for Exponential
[src]
impl Mean<f64> for Exponential
impl Median<f64> for Exponential
[src]
impl Median<f64> for Exponential
impl Mode<f64> for Exponential
[src]
impl Mode<f64> for Exponential
impl Variance<f64> for Exponential
[src]
impl Variance<f64> for Exponential
impl Rv<f32> for Exponential
[src]
impl Rv<f32> for Exponential
fn ln_f(&self, x: &f32) -> f64
[src]
fn ln_f(&self, x: &f32) -> f64
Un-normalized probability function Read more
fn ln_normalizer(&self) -> f64
[src]
fn ln_normalizer(&self) -> f64
The log of the constant term in the PDF/PMF. Should not be a function of any of the parameters. Read more
fn draw<R: Rng>(&self, rng: &mut R) -> f32
[src]
fn draw<R: Rng>(&self, rng: &mut R) -> f32
Single draw from the Rv
Read more
fn sample<R: Rng>(&self, n: usize, rng: &mut R) -> Vec<f32>
[src]
fn sample<R: Rng>(&self, n: usize, rng: &mut R) -> Vec<f32>
Multiple draws of the Rv
Read more
fn f(&self, x: &X) -> f64
[src]
fn f(&self, x: &X) -> f64
Un-normalized probability function Read more
fn normalizer(&self) -> f64
[src]
fn normalizer(&self) -> f64
The constant term in the PDF/PMF. Should not be a function of any of the parameters. Read more
impl Support<f32> for Exponential
[src]
impl Support<f32> for Exponential
impl ContinuousDistr<f32> for Exponential
[src]
impl ContinuousDistr<f32> for Exponential
fn pdf(&self, x: &X) -> f64
[src]
fn pdf(&self, x: &X) -> f64
The value of the Probability Density Function (PDF) at x
Read more
fn ln_pdf(&self, x: &X) -> f64
[src]
fn ln_pdf(&self, x: &X) -> f64
The value of the log Probability Density Function (PDF) at x
Read more
impl Cdf<f32> for Exponential
[src]
impl Cdf<f32> for Exponential
fn cdf(&self, x: &f32) -> f64
[src]
fn cdf(&self, x: &f32) -> f64
The value of the Cumulative Density Function at x
Read more
fn sf(&self, x: &X) -> f64
[src]
fn sf(&self, x: &X) -> f64
Survival function, 1 - CDF(x)
impl InverseCdf<f32> for Exponential
[src]
impl InverseCdf<f32> for Exponential
fn invcdf(&self, p: f64) -> f32
[src]
fn invcdf(&self, p: f64) -> f32
The value of the x
at the given probability in the CDF Read more
fn quantile(&self, p: f64) -> X
[src]
fn quantile(&self, p: f64) -> X
Alias for invcdf
fn interval(&self, p: f64) -> (X, X)
[src]
fn interval(&self, p: f64) -> (X, X)
Interval containing p
proportion for the probability Read more
impl Mean<f32> for Exponential
[src]
impl Mean<f32> for Exponential
impl Median<f32> for Exponential
[src]
impl Median<f32> for Exponential
impl Mode<f32> for Exponential
[src]
impl Mode<f32> for Exponential
impl Variance<f32> for Exponential
[src]
impl Variance<f32> for Exponential
Auto Trait Implementations
impl Send for Exponential
impl Send for Exponential
impl Sync for Exponential
impl Sync for Exponential