| Crates.io | fdars-core |
| lib.rs | fdars-core |
| version | 0.3.0 |
| created_at | 2026-01-01 11:30:54.213919+00 |
| updated_at | 2026-01-05 11:11:15.509908+00 |
| description | Functional Data Analysis algorithms in Rust |
| homepage | https://github.com/sipemu/fdars |
| repository | https://github.com/sipemu/fdars |
| max_upload_size | |
| id | 2016081 |
| size | 528,213 |
Pure Rust algorithms for Functional Data Analysis (FDA).
fdars-core provides high-performance implementations of various FDA methods, designed to be used as a library in Rust projects or as the backend for R/Python bindings.
Add to your Cargo.toml:
[dependencies]
fdars-core = "0.3"
Or install from the repository:
[dependencies]
fdars-core = { git = "https://github.com/sipemu/fdars" }
parallel (default): Enable rayon-based parallel processinglinalg (default): Enable linear algebra features (faer, ridge regression)js: Enable WASM support with JS random number generationFor WASM builds, disable default features:
[dependencies]
fdars-core = { version = "0.2", default-features = false }
Functional data is represented as column-major matrices stored in flat Vec<f64>:
data[i + j * n] gives observation i at point juse fdars_core::{fdata, depth, helpers};
// Create sample functional data (3 observations, 10 points each)
let n = 3;
let m = 10;
let data: Vec<f64> = (0..(n * m)).map(|i| (i as f64).sin()).collect();
let argvals: Vec<f64> = (0..m).map(|i| i as f64 / (m - 1) as f64).collect();
// Compute mean function
let mean = fdata::mean_1d(&data, n, m);
// Compute Fraiman-Muniz depth
let depths = depth::fraiman_muniz_1d(&data, &data, n, n, m, true);
With the parallel feature (enabled by default), computationally intensive operations use rayon for multi-core performance. The library also supports WASM targets with sequential execution.
MIT