[][src]Function rstats::gmean

pub fn gmean(dvec: &[i64]) -> Result<f64>

Geometric mean of an i64 slice.
The geometric mean is just an exponential of an arithmetic mean of log data (natural logarithms of the data items).
The geometric mean is less sensitive to outliers near maximal value.
Zero valued data is not allowed.

Example

use rstats::gmean;
const VEC1:[i64;14] = [1,2,3,4,5,6,7,8,9,10,11,12,13,14];
assert_eq!(gmean(&VEC1).unwrap(),6.045855171418503_f64);