[][src]Trait statrs::statistics::Min

pub trait Min<T> {
    fn min(&self) -> T;
}

The Min trait specifies than an object has a minimum value

Required methods

fn min(&self) -> T

Returns the minimum value in the domain of a given distribution representable by a double-precision float. May panic depending on the implementor.

Examples

use statrs::statistics::Min;
use statrs::distribution::Uniform;

let n = Uniform::new(0.0, 1.0).unwrap();
assert_eq!(0.0, n.min());
Loading content...

Implementations on Foreign Types

impl Min<f64> for [f64][src]

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

Returns the minimum value in the data

Remarks

Returns f64::NAN if data is empty or an entry is f64::NAN

Examples

use std::f64;
use statrs::statistics::Min;

let x: [f64; 0] = [];
assert!(x.min().is_nan());

let y = [0.0, f64::NAN, 3.0, -2.0];
assert!(y.min().is_nan());

let z = [0.0, 3.0, -2.0];
assert_eq!(z.min(), -2.0);
Loading content...

Implementors

impl Min<f64> for Beta[src]

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

Returns the minimum value in the domain of the beta distribution representable by a double precision float

Formula

This example is not tested
0

impl Min<f64> for Cauchy[src]

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

Returns the minimum value in the domain of the cauchy distribution representable by a double precision float

Formula

This example is not tested
NEG_INF

impl Min<f64> for Chi[src]

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

Returns the minimum value in the domain of the chi distribution representable by a double precision float

Formula

This example is not tested
0

impl Min<f64> for ChiSquared[src]

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

Returns the minimum value in the domain of the chi-squared distribution representable by a double precision float

Formula

This example is not tested
0

impl Min<f64> for Erlang[src]

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

Returns the minimum value in the domain of the erlang distribution representable by a double precision float

Formula

This example is not tested
0

impl Min<f64> for Exponential[src]

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

Returns the minimum value in the domain of the exponential distribution representable by a double precision float

Formula

This example is not tested
0

impl Min<f64> for FisherSnedecor[src]

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

Returns the minimum value in the domain of the fisher-snedecor distribution representable by a double precision float

Formula

This example is not tested
0

impl Min<f64> for Gamma[src]

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

Returns the minimum value in the domain of the gamma distribution representable by a double precision float

Formula

This example is not tested
0

impl Min<f64> for InverseGamma[src]

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

Returns the minimum value in the domain of the inverse gamma distribution representable by a double precision float

Formula

This example is not tested
0

impl Min<f64> for LogNormal[src]

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

Returns the minimum value in the domain of the log-normal distribution representable by a double precision float

Formula

This example is not tested
0

impl Min<f64> for Normal[src]

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

Returns the minimum value in the domain of the normal distribution representable by a double precision float

Formula

This example is not tested
-INF

impl Min<f64> for Pareto[src]

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

Returns the minimum value in the domain of the Pareto distribution representable by a double precision float

Formula

This example is not tested
x_m

where x_m is the scale

impl Min<f64> for StudentsT[src]

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

Returns the minimum value in the domain of the student's t-distribution representable by a double precision float

Formula

This example is not tested
-INF

impl Min<f64> for Triangular[src]

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

Returns the minimum value in the domain of the triangular distribution representable by a double precision float

Remarks

The return value is the same min used to construct the distribution

impl Min<f64> for Uniform[src]

impl Min<f64> for Weibull[src]

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

Returns the minimum value in the domain of the weibull distribution representable by a double precision float

Formula

This example is not tested
0

impl Min<i64> for DiscreteUniform[src]

fn min(&self) -> i64[src]

Returns the minimum value in the domain of the discrete uniform distribution

Remarks

This is the same value as the minimum passed into the constructor

impl Min<u64> for Bernoulli[src]

fn min(&self) -> u64[src]

Returns the minimum value in the domain of the bernoulli distribution representable by a 64- bit integer

Formula

This example is not tested
0

impl Min<u64> for Binomial[src]

fn min(&self) -> u64[src]

Returns the minimum value in the domain of the binomial distribution representable by a 64-bit integer

Formula

This example is not tested
0

impl Min<u64> for Categorical[src]

fn min(&self) -> u64[src]

Returns the minimum value in the domain of the categorical distribution representable by a 64-bit integer

Formula

This example is not tested
0

impl Min<u64> for Geometric[src]

fn min(&self) -> u64[src]

Returns the minimum value in the domain of the geometric distribution representable by a 64-bit integer

Formula

This example is not tested
1

impl Min<u64> for Hypergeometric[src]

fn min(&self) -> u64[src]

Returns the minimum value in the domain of the hypergeometric distribution representable by a 64-bit integer

Formula

This example is not tested
max(0, n + K - N)

where N is population, K is successes, and n is draws

impl Min<u64> for Poisson[src]

fn min(&self) -> u64[src]

Returns the minimum value in the domain of the poisson distribution representable by a 64-bit integer

Formula

This example is not tested
0
Loading content...