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

pub struct Triangular {
    // some fields omitted
}

A triangular distribution.

Methods

impl Triangular
[src]

fn new(a: f64, b: f64, c: f64) -> Self

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

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

fn a(&self) -> f64

Return the left endpoint of the support.

fn b(&self) -> f64

Return the right endpoint of the support.

fn c(&self) -> f64

Return the mode parameter.

Trait Implementations

impl Copy for Triangular
[src]

impl Clone for Triangular
[src]

fn clone(&self) -> Triangular

Returns a copy of the value. Read more

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

Performs copy-assignment from source. Read more

impl Continuous for Triangular
[src]

fn density(&self, x: f64) -> f64

Compute the probability density function.

impl Distribution for Triangular
[src]

type Value = f64

The type of outcomes.

fn distribution(&self, x: f64) -> f64

Compute the cumulative distribution function.

impl Entropy for Triangular
[src]

fn entropy(&self) -> f64

Compute the differential entropy. Read more

impl Inverse for Triangular
[src]

fn inverse(&self, p: f64) -> f64

Compute the inverse of the cumulative distribution function.

impl Kurtosis for Triangular
[src]

fn kurtosis(&self) -> f64

Compute the excess kurtosis.

impl Mean for Triangular
[src]

fn mean(&self) -> f64

Compute the expected value.

impl Median for Triangular
[src]

fn median(&self) -> f64

Compute the median.

impl Modes for Triangular
[src]

fn modes(&self) -> Vec<f64>

Compute the modes.

impl Sample for Triangular
[src]

fn sample<S>(&self, source: &mut S) -> f64 where S: Source

Draw a sample.

impl Skewness for Triangular
[src]

fn skewness(&self) -> f64

Compute the skewness.

impl Variance for Triangular
[src]

fn variance(&self) -> f64

Compute the variance.

fn deviation(&self) -> f64

Compute the standard deviation.