Function math::mean::arithmetic [] [src]

pub fn arithmetic(slice: &[f64]) -> f64

Calculates arithmetic mean (AM) of data set slice.

Arguments

  • slice - collection of values

Example

use math::mean;

let slice = [8., 16.];
assert_eq!(mean::arithmetic(&slice), 12.);