Trait statrs::statistics::Mode [] [src]

pub trait Mode<T> {
    fn mode(&self) -> T;
}

The Mode trait specififies than an object has a closed form solution for its mode(s)

Required Methods

Returns the mode. May panic depending on the implementor.

Examples

use statrs::statistics::Mode;
use statrs::distribution::Uniform;

let n = Uniform::new(0.0, 1.0).unwrap();
assert_eq!(0.5, n.mode());

Implementors