Rstats - Rust Stats

GitHub last commit Crates.io

Rstats is a lean minimalistic library that only depends on anyhow (for its error handling). Trait RStats is carefully checked and will report all kinds of errors, such as empty input. Trait Vectors is unchecked to achieve speed, so some caution is advisable.

Trait RStats

has statistical methods implemented for &[i64] and &[f64] slices. For example, s.amean() computes the arithmetic mean of slice s of either type.

Included are:

Trait Vectors

has basic vector algebra implemented for &[f64] slices. Should you get errors when applying them to Vec<f64>, just convert self using .as_slice(). See doc examples.

Trait MutVectors

Some of the above Vector methods are for efficiency reasons reimplemented here so that they mutate self in place instead of creating a new Vec. Useful for iterative methods on vectors. Beware that some methods do not return anything, so they can not be chained.

Releases