Crates.io | stat-rs |
lib.rs | stat-rs |
version | 0.1.1 |
source | src |
created_at | 2024-08-10 10:10:23.997519 |
updated_at | 2024-09-24 19:48:28.915286 |
description | A statistics library |
homepage | |
repository | https://github.com/rawhuul/stat-rs |
max_upload_size | |
id | 1332226 |
size | 45,405 |
This library provides a comprehensive implementation for statistical operations on fixed-size numerical series in Rust, designed for both std
and no-std
environments. It features functions for various statistical analyses, including descriptive statistics, measures of central tendency, dispersion, and outlier detection.
ArrayVec
.Here's a quick example of how to create a series and perform some statistical calculations:
let data: [f64; 5] = [1.0, 2.0, 3.0, 4.0, 5.0];
let series = Series::from(data);
// Returns None, only if Series is empty
let mean = series.mean().unwrap();
let median = series.median().unwrap();
let variance = series.variance().unwrap();
println!("Mean: {}", mean);
println!("Median: {}", median);
println!("Variance: {}", variance);