Struct rv::dist::Cauchy [−][src]
Cauchy distribution over x in (-∞, ∞)
Example
use rv::prelude::*; let cauchy = Cauchy::new(1.2, 3.4).expect("Invalid params"); let ln_fx = cauchy.ln_pdf(&0.2_f64); // -2.4514716152673368 assert!((ln_fx + 2.4514716152673368).abs() < 1E-12);
Fields
loc: f64
location, x0, in (-∞, ∞)
scale: f64
location, γ, in (0, ∞)
Methods
impl Cauchy
[src]
impl Cauchy
Trait Implementations
impl Debug for Cauchy
[src]
impl Debug for Cauchy
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 Cauchy
[src]
impl Clone for Cauchy
fn clone(&self) -> Cauchy
[src]
fn clone(&self) -> Cauchy
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 Default for Cauchy
[src]
impl Default for Cauchy
impl Entropy for Cauchy
[src]
impl Entropy for Cauchy
impl Rv<f64> for Cauchy
[src]
impl Rv<f64> for Cauchy
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 Cauchy
[src]
impl Support<f64> for Cauchy
impl ContinuousDistr<f64> for Cauchy
[src]
impl ContinuousDistr<f64> for Cauchy
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 Cauchy
[src]
impl Cdf<f64> for Cauchy
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 Cauchy
[src]
impl InverseCdf<f64> for Cauchy
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 Median<f64> for Cauchy
[src]
impl Median<f64> for Cauchy
impl Mode<f64> for Cauchy
[src]
impl Mode<f64> for Cauchy
impl Rv<f32> for Cauchy
[src]
impl Rv<f32> for Cauchy
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 Cauchy
[src]
impl Support<f32> for Cauchy
impl ContinuousDistr<f32> for Cauchy
[src]
impl ContinuousDistr<f32> for Cauchy
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 Cauchy
[src]
impl Cdf<f32> for Cauchy
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 Cauchy
[src]
impl InverseCdf<f32> for Cauchy
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 Median<f32> for Cauchy
[src]
impl Median<f32> for Cauchy
impl Mode<f32> for Cauchy
[src]
impl Mode<f32> for Cauchy