[][src]Function rstats::hwmean

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

Linearly weighted harmonic mean of an i64 slice.
Linearly descending weights from n down to one.
Time dependent data should be in the stack order - the last being the oldest.

Example

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