[][src]Struct rstat::continuous::Triangular

pub struct Triangular {
    pub a: f64,
    pub b: f64,
    pub c: f64,
}

Fields

a: f64b: f64c: f64

Methods

impl Triangular[src]

pub fn new(a: f64, b: f64, c: f64) -> Triangular[src]

pub fn symmetric(a: f64, b: f64) -> Triangular[src]

Trait Implementations

impl Distribution for Triangular[src]

type Support = Interval

fn ccdf(&self, x: <Self::Support as Space>::Value) -> Probability[src]

Evaluates the complementary cumulative distribution function at x. Read more

fn logcdf(&self, x: <Self::Support as Space>::Value) -> f64[src]

Evaluates the log CDF at x: ln F(x).

fn logccdf(&self, x: <Self::Support as Space>::Value) -> f64[src]

Evaluates the log complementary CDF at x: ln (1 - F(x)).

fn cdf_batch(
    &self,
    xs: Vector<<Self::Support as Space>::Value>
) -> Vector<Probability>
[src]

Evaluates the CDF element-wise for a batch xs.

fn ccdf_batch(
    &self,
    xs: Vector<<Self::Support as Space>::Value>
) -> Vector<Probability>
[src]

Evaluates the complementary CDF element-wise for a batch xs.

fn logcdf_batch(
    &self,
    xs: Vector<<Self::Support as Space>::Value>
) -> Vector<f64>
[src]

Evaluates the log CDF element-wise for a batch xs.

fn logccdf_batch(
    &self,
    xs: Vector<<Self::Support as Space>::Value>
) -> Vector<f64>
[src]

Evaluates the log complementary CDF element-wise for a batch xs.

fn sample_n<D, Sh, R: ?Sized>(
    &self,
    rng: &mut R,
    shape: Sh
) -> Array<<Self::Support as Space>::Value, D> where
    D: Dimension,
    Sh: ShapeBuilder<Dim = D>,
    R: Rng
[src]

Important traits for Sampler<D, R>
fn sample_iter<R>(self, rng: R) -> Sampler<Self, R> where
    Self: Sized,
    R: Rng
[src]

impl ContinuousDistribution for Triangular[src]

fn logpdf(&self, x: <Self::Support as Space>::Value) -> f64[src]

Evaluates the log PDF at x.

fn pdf_batch(
    &self,
    xs: Vector<<Self::Support as Space>::Value>
) -> Vector<Probability>
[src]

Evaluates the PDF element-wise for a batch xs.

fn logpdf_batch(
    &self,
    xs: Vector<<Self::Support as Space>::Value>
) -> Vector<f64>
[src]

Evaluates the log PDF element-wise for a batch xs.

fn loglikelihood(&self, xs: Vector<<Self::Support as Space>::Value>) -> f64[src]

impl UnivariateMoments for Triangular[src]

fn standard_deviation(&self) -> f64[src]

Computes the standard deviation of the distribution.

impl Quantiles for Triangular[src]

fn cquantile(&self, p: Probability) -> f64[src]

Evaluates the complementary quantile function at x: Q(1 - p).

fn lower_quartile(&self) -> f64[src]

Computes the lower quartile of the distribution, Q(0.25).

fn upper_quartile(&self) -> f64[src]

Computes the upper quartile of the distribution, Q(0.75).

fn iqr(&self) -> f64[src]

Computes the interquartile range (IQR) of the distribution, Q(0.75) - Q(0.25).

fn lower_fence(&self) -> f64[src]

Computes the lower fence of the distribution, Q(0.25) - 1.5 · IQR. Read more

fn upper_fence(&self) -> f64[src]

Computes the lower fence of the distribution, Q(0.75) + 1.5 · IQR. Read more

impl Modes for Triangular[src]

impl Entropy for Triangular[src]

impl Clone for Triangular[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Copy for Triangular[src]

impl Display for Triangular[src]

impl Debug for Triangular[src]

Auto Trait Implementations

impl Send for Triangular

impl Sync for Triangular

Blanket Implementations

impl<T> From for T[src]

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> ToString for T where
    T: Display + ?Sized
[src]

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.