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

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

The Min trait specifies than an object has a minimum value

Required Methods

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());

Implementations on Foreign Types

impl Min<f64> for [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);

Implementors