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]
impl Distribution for Triangular
[src]
type Value = f64
The type of outcomes.
fn distribution(&self, x: f64) -> f64
Compute the cumulative distribution function.