mean

Function mean 

Source
pub fn mean<T, V, I>(data: I) -> Option<T>
where T: Float + FromPrimitive + AddAssign, V: DerefCopy<Output = T>, I: IntoIterator<Item = V>,
Expand description

Get the mean of a set of data

This method takes constant space and linear time.

ยงExamples:

let mean: f64 = inc_stats::mean(&[2.0, 4.0]).unwrap();
assert!((3.0 - mean).abs() < 1.0e-6);