fdars_core/lib.rs
1//! # fdars-core
2//!
3//! Core algorithms for Functional Data Analysis in Rust.
4//!
5//! This crate provides pure Rust implementations of various FDA methods including:
6//! - Functional data operations (mean, derivatives, norms)
7//! - Depth measures (Fraiman-Muniz, modal, band, random projection, etc.)
8//! - Distance metrics (Lp, Hausdorff, DTW, Fourier, etc.)
9//! - Basis representations (B-splines, P-splines, Fourier)
10//! - Clustering (k-means, fuzzy c-means)
11//! - Smoothing (Nadaraya-Watson, local linear/polynomial regression)
12//! - Outlier detection
13//! - Regression (PCA, PLS, ridge)
14//! - Seasonal analysis (period estimation, peak detection, seasonal strength)
15//! - Detrending and decomposition for non-stationary data
16//!
17//! ## Data Layout
18//!
19//! Functional data is represented as column-major matrices stored in flat vectors:
20//! - For n observations with m evaluation points: `data[i + j * n]` gives observation i at point j
21//! - 2D surfaces (n observations, m1 x m2 grid): stored as n x (m1*m2) matrices
22
23#![allow(clippy::needless_range_loop)]
24
25pub mod basis;
26pub mod clustering;
27pub mod depth;
28pub mod detrend;
29pub mod fdata;
30pub mod helpers;
31pub mod irreg_fdata;
32pub mod metric;
33pub mod outliers;
34pub mod regression;
35pub mod seasonal;
36pub mod simulation;
37pub mod smoothing;
38pub mod utility;
39
40// Re-export commonly used items
41pub use helpers::{simpsons_weights, simpsons_weights_2d};
42
43// Re-export seasonal analysis types
44pub use seasonal::{
45 ChangeDetectionResult, ChangePoint, ChangeType, DetectedPeriod, InstantaneousPeriod, Peak,
46 PeakDetectionResult, PeriodEstimate, StrengthMethod,
47};
48
49// Re-export detrending types
50pub use detrend::{DecomposeResult, TrendResult};
51
52// Re-export simulation types
53pub use simulation::{EFunType, EValType};
54
55// Re-export irregular fdata types
56pub use irreg_fdata::IrregFdata;