Commit Graph

5 Commits

Author SHA1 Message Date
Vinzent Steinberg
e4345f5046 impl FromIterator<&f64> and FromIterator<&(f64, f64)>
This allows to write

    let k: Kurtosis = a.iter().collect();

instead of

    let k: Kurtosis = a.iter().map(|x| *x).collect();

but breaks type inference for code like

    let m: Min = (1..6).map(Into::into).collect();

where

    let m: Min = (1..6).map(f64::from).collect();

has to be used instead.

Fixes #8.
2018-02-28 23:44:40 +01:00
Vinzent Steinberg
d539342bf1 Moments: Add serde test 2018-01-11 19:42:41 +01:00
Vinzent Steinberg
383c85c470 Improve test slightly 2018-01-11 19:25:25 +01:00
Vinzent Steinberg
9f2a8ee44f Moments: Test merge 2018-01-11 19:16:11 +01:00
Vinzent Steinberg
c1fab4722c Implement incremental calculation of arbitrary moments 2018-01-11 18:29:43 +01:00