Struct rv::dist::Cauchy[][src]

pub struct Cauchy {
    pub loc: f64,
    pub scale: f64,
}

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

location, x0, in (-∞, ∞)

location, γ, in (0, ∞)

Methods

impl Cauchy
[src]

Trait Implementations

impl Debug for Cauchy
[src]

Formats the value using the given formatter. Read more

impl Clone for Cauchy
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Default for Cauchy
[src]

Returns the "default value" for a type. Read more

impl Entropy for Cauchy
[src]

The entropy, H(X)

impl Rv<f64> for Cauchy
[src]

Un-normalized probability function Read more

The log of the constant term in the PDF/PMF. Should not be a function of any of the parameters. Read more

Single draw from the Rv Read more

Multiple draws of the Rv Read more

Un-normalized probability function Read more

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]

Returns true if x is in the support of the Rv Read more

impl ContinuousDistr<f64> for Cauchy
[src]

The value of the Probability Density Function (PDF) at x Read more

The value of the log Probability Density Function (PDF) at x Read more

impl Cdf<f64> for Cauchy
[src]

The value of the Cumulative Density Function at x Read more

Survival function, 1 - CDF(x)

impl InverseCdf<f64> for Cauchy
[src]

The value of the x at the given probability in the CDF Read more

Alias for invcdf

Interval containing p proportion for the probability Read more

impl Median<f64> for Cauchy
[src]

Returns None if the median is undefined

impl Mode<f64> for Cauchy
[src]

Returns None if the mode is undefined or is not a single value

impl Rv<f32> for Cauchy
[src]

Un-normalized probability function Read more

The log of the constant term in the PDF/PMF. Should not be a function of any of the parameters. Read more

Single draw from the Rv Read more

Multiple draws of the Rv Read more

Un-normalized probability function Read more

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]

Returns true if x is in the support of the Rv Read more

impl ContinuousDistr<f32> for Cauchy
[src]

The value of the Probability Density Function (PDF) at x Read more

The value of the log Probability Density Function (PDF) at x Read more

impl Cdf<f32> for Cauchy
[src]

The value of the Cumulative Density Function at x Read more

Survival function, 1 - CDF(x)

impl InverseCdf<f32> for Cauchy
[src]

The value of the x at the given probability in the CDF Read more

Alias for invcdf

Interval containing p proportion for the probability Read more

impl Median<f32> for Cauchy
[src]

Returns None if the median is undefined

impl Mode<f32> for Cauchy
[src]

Returns None if the mode is undefined or is not a single value

Auto Trait Implementations

impl Send for Cauchy

impl Sync for Cauchy