Struct probability::prelude::Uniform [] [src]

pub struct Uniform {
    // some fields omitted
}

A continuous uniform distribution.

Methods

impl Uniform
[src]

fn new(a: f64, b: f64) -> Uniform

Create a uniform distribution on interval [a, b].

It should hold that a < b.

fn a(&self) -> f64

Return the left endpoint of the support.

fn b(&self) -> f64

Return the right endpoint of the support.

Trait Implementations

impl Copy for Uniform
[src]

impl Clone for Uniform
[src]

fn clone(&self) -> Uniform

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 Distribution for Uniform
[src]

type Value = f64

The type of outcomes.

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

Compute the distribution function. Read more

impl Continuous for Uniform
[src]

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

Compute the probability density function.

impl Entropy for Uniform
[src]

fn entropy(&self) -> f64

Compute the differential entropy. Read more

impl Inverse for Uniform
[src]

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

Compute the inverse of the distribution function.

impl Kurtosis for Uniform
[src]

fn kurtosis(&self) -> f64

Compute the excess kurtosis.

impl Mean for Uniform
[src]

fn mean(&self) -> f64

Compute the expected value.

impl Median for Uniform
[src]

fn median(&self) -> f64

Compute the median.

impl Sample for Uniform
[src]

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

Draw a sample.

impl Skewness for Uniform
[src]

fn skewness(&self) -> f64

Compute the skewness.

impl Variance for Uniform
[src]

fn variance(&self) -> f64

Compute the variance.

fn deviation(&self) -> f64

Compute the standard deviation.

fn var(&self) -> f64

Compute the variance. Read more

fn sd(&self) -> f64

Compute the standard deviation. Read more