Trait statrs::statistics::Mean [] [src]

pub trait Mean<T> {
    fn mean(&self) -> T;
}

The Mean trait specifies than an object has a closed form solution for its mean(s)

Required Methods

Returns the mean. May panic depending on the implementor.

Examples

use statrs::statistics::Mean;
use statrs::distribution::Uniform;

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

Implementors