Commit Graph

199 Commits

Author SHA1 Message Date
Vinzent Steinberg
c04ce8887e histogram: Implement AddAssign and MulAssign
Also clarify documentation and name of `min`/`max`.
2018-03-07 17:08:19 +01:00
Vinzent Steinberg
2775f78e8e Expose finding of bin for given sample 2018-03-06 19:31:09 +01:00
Vinzent Steinberg
682fec27fe histogram: Implement min, max and reset 2018-03-06 19:22:42 +01:00
Vinzent Steinberg
08445ba2a3 histogram: Inline default impls 2018-03-06 19:03:46 +01:00
Vinzent Steinberg
d1ab9630af histogram: Implement iteration over bin centers 2018-03-06 18:55:21 +01:00
Vinzent Steinberg
3f22412aa3 Fix clippy warnings 2018-03-06 18:48:08 +01:00
Vinzent Steinberg
86a411143e histogram: Implement iteration of bin widths and normalized bins 2018-03-06 18:27:31 +01:00
Vinzent Steinberg
c64544baa8 Implement iteration of histograms 2018-03-06 17:16:54 +01:00
Vinzent Steinberg
ba93bb4e65 Refactor histograms to use common trait 2018-03-06 16:26:02 +01:00
Vinzent Steinberg
dcb006e6e0 Merge branch 'master' of https://github.com/vks/average 2018-03-06 15:56:09 +01:00
Vinzent Steinberg
3a0dcafd21 Implement histograms
In order for them to have constant size, a macro is provided to crate
the histogram type. This should be replaced by const generics once Rust
has them.
2018-03-06 15:54:30 +01:00
Vinzent Steinberg
87bf71baa4 variable -> growing 2018-03-01 01:54:41 +01:00
Vinzent Steinberg
f553a06521 Mention quantiles crate 2018-03-01 01:40:02 +01:00
Vinzent Steinberg
8b5fb44500 Clarify limitations of quantile algorithm
Refs #10.
2018-03-01 01:33:39 +01:00
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
68a4fa64cb Restore compatibility with stable 2018-01-12 14:23:38 +01:00
Vinzent Steinberg
d539342bf1 Moments: Add serde test 2018-01-11 19:42:41 +01:00
Vinzent Steinberg
a6a477d621 Benchmark generic vs. handwritten implementation of kurtosis
Also restore no_std and remove printing left over from debugging.
2018-01-11 19:37:25 +01:00
Vinzent Steinberg
785e2141e0 Moments: Refactor merge to be in-place 2018-01-11 19:30:51 +01:00
Vinzent Steinberg
383c85c470 Improve test slightly 2018-01-11 19:25:25 +01:00
Vinzent Steinberg
0d6cf939d1 Clarify type of kurtosis 2018-01-11 19:22:11 +01:00
Vinzent Steinberg
df099b61da Moments::merge: Calculate binomial iteratively 2018-01-11 19:19:56 +01:00
Vinzent Steinberg
9f2a8ee44f Moments: Test merge 2018-01-11 19:16:11 +01:00
Vinzent Steinberg
49ce6c5256 Moments::add: Calculate binomials iteratively 2018-01-11 19:07:57 +01:00
Vinzent Steinberg
3fd3bc4ac9 Moments: Refactor add to be in-place 2018-01-11 19:00:59 +01:00
Vinzent Steinberg
608a9733cd Code clean-up and more impls for Moments 2018-01-11 18:39:49 +01:00
Vinzent Steinberg
c1fab4722c Implement incremental calculation of arbitrary moments 2018-01-11 18:29:43 +01:00
Vinzent Steinberg
d9f0b056c6 Bump version 2018-01-10 16:06:13 +01:00
Vinzent Steinberg
4bcc52ef25 Reenable clippy lint that no longer gives false positives 2018-01-10 16:04:29 +01:00
Vinzent Steinberg
2ee38b9d57 Fix clippy warnings 2018-01-10 16:02:55 +01:00
Vinzent Steinberg
11260d255b Fix a compiler warning 2017-12-21 10:47:45 +01:00
Eh2406
982acc9bf6 clippy 2017-12-20 16:59:51 -05:00
Eh2406
cac986d87e Add test 2017-12-20 16:46:50 -05:00
Vinzent Steinberg
5963cbb032
Fix typos 2017-12-20 14:55:09 +01:00
Eh2406
e41ae320ac Add to docs 2017-12-18 12:14:24 -05:00
Eh2406
ad9fba41e7 add serde to travis 2017-12-17 23:31:25 -05:00
Eh2406
b26652f2a7 inline reduce to make minmax compatibal with serde 2017-12-17 22:53:50 -05:00
Eh2406
046f47a0c2 add a feature = "serde" 2017-12-17 22:11:11 -05:00
Vinzent Steinberg
60410cd118 Add crates.io link to documentation 2017-11-19 20:49:28 +01:00
Vinzent Steinberg
ff68684753 Run Travis CI on 32 bit as well 2017-11-19 20:45:57 +01:00
Vinzent Steinberg
16a751bbe0 Bump version 2017-11-19 11:08:33 +01:00
Vinzent Steinberg
fed9248122 Include license verbatim 2017-11-19 11:07:58 +01:00
Vinzent Steinberg
c7ee8a6587 Clean up formatting 2017-11-19 10:57:01 +01:00
Vinzent Steinberg
7f6d1a12c2 Move quantile tests to external file if possible 2017-11-19 10:50:59 +01:00
Vinzent Steinberg
5656156660 Fix a negative underflow when calculating quantiles
Fixes #5.
2017-11-19 10:31:00 +01:00
Vinzent Steinberg
57f9d13434 Merge branch 'percentile-99-9' of https://github.com/niklasf/average into panic 2017-11-19 10:17:59 +01:00
Vinzent Steinberg
6568725139 Merge branch 'master' of https://github.com/vks/average 2017-11-19 10:13:41 +01:00
Niklas Fiekas
f7ee0b1127 Panic when using quantile close to 1 2017-11-18 12:22:58 +01:00
Vinzent Steinberg
000c894b04
Merge pull request #4 from singron/fix-32
Fix compile on 32-bit
2017-11-13 09:11:29 +01:00
Eric Culp
d8d171e025 Fix compile on 32-bit
Fix #3
2017-11-12 16:42:48 -08:00