Struct probability::prelude::Triangular[][src]

pub struct Triangular { /* fields omitted */ }

A triangular distribution.

Implementations

impl Triangular[src]

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

Create a triangular distribution with mode c on interval [a, b].

It should hold that a < b, a <= c, and c <= b.

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

Return the left endpoint of the support.

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

Return the right endpoint of the support.

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

Return the mode parameter.

Trait Implementations

impl Clone for Triangular[src]

impl Continuous for Triangular[src]

impl Copy for Triangular[src]

impl Debug for Triangular[src]

impl Distribution for Triangular[src]

type Value = f64

The type of outcomes.

impl Entropy for Triangular[src]

impl Inverse for Triangular[src]

impl Kurtosis for Triangular[src]

impl Mean for Triangular[src]

impl Median for Triangular[src]

impl Modes for Triangular[src]

impl Sample for Triangular[src]

impl Skewness for Triangular[src]

impl Variance for Triangular[src]

Auto Trait Implementations

impl RefUnwindSafe for Triangular

impl Send for Triangular

impl Sync for Triangular

impl Unpin for Triangular

impl UnwindSafe for Triangular

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<T> From<T> for T[src]

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

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

type Owned = T

The resulting type after obtaining ownership.

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.