Skip to main content

embedded_dsp/
lib.rs

1#![no_std]
2#![allow(missing_docs)]
3
4//! # embedded-dsp
5//!
6//! A `#![no_std]` Rust digital signal processing library for microcontrollers, embedded systems, and real-time signal processing applications.
7//!
8//! ## Overview
9//!
10//! `embedded-dsp` provides zero-allocation digital signal processing algorithms:
11//!
12//! - **Basic Math**: Elementwise addition, subtraction, multiplication, dot product, scale, shift, clip, logic ops.
13//! - **Complex Math**: Complex vector addition, multiplication, magnitude, magnitude squared, conjugate, dot product.
14//! - **Fast Math**: Trigonometric (sin, cos, atan2), square root, division, log, exp.
15//! - **Statistics**: Mean, variance, standard deviation, RMS, power, min/max, entropy, Kullback-Leibler, LogSumExp.
16//! - **Support**: Vector copy, fill, type conversions (Q7, Q15, Q31, F32), sort, barycenter, weighted sum.
17//! - **Matrix**: Matrix addition, subtraction, multiplication, scale, transpose, Gauss-Jordan inverse.
18//! - **Filtering**: FIR, Biquad IIR Direct Form I, LMS adaptive filters, Convolution, Correlation.
19//! - **Transform**: In-place Complex FFT (CFFT), Real FFT (RFFT), DCT-IV, Bit reversal.
20//! - **Controller**: PID motor controller, Clarke transform, Park transform, Inverse Clarke/Park.
21//! - **Interpolation**: Linear, Bilinear, Cubic spline interpolation.
22//! - **Quaternion**: Norm, normalization, product, conjugate, inverse, rotation matrix conversion.
23//! - **Window**: Hanning, Hamming, Blackman, Bartlett, Welch, Flat-top window generators.
24//! - **Distance**: Euclidean, Cosine, Chebyshev, Manhattan, Minkowski, Jaccard, Hamming, Canberra, Bray-Curtis.
25//! - **Bayes**: Gaussian Naive Bayes classifier.
26//! - **SVM**: Support Vector Machine classifier with Linear, Polynomial, RBF, and Sigmoid kernels.
27
28#[cfg(feature = "std")]
29extern crate std;
30
31#[cfg(feature = "basic-math")]
32pub mod basic_math;
33#[cfg(feature = "bayes")]
34pub mod bayes;
35#[cfg(feature = "complex-math")]
36pub mod complex_math;
37#[cfg(feature = "controller")]
38pub mod controller;
39#[cfg(feature = "distance")]
40pub mod distance;
41#[cfg(feature = "fast-math")]
42pub mod fast_math;
43#[cfg(feature = "filtering")]
44pub mod filtering;
45#[cfg(feature = "fixed-point")]
46pub mod fixed_point;
47#[cfg(feature = "interpolation")]
48pub mod interpolation;
49#[cfg(feature = "lut")]
50pub mod lut;
51pub mod math;
52#[cfg(feature = "matrix")]
53pub mod matrix;
54#[cfg(feature = "quaternion")]
55pub mod quaternion;
56#[cfg(feature = "statistics")]
57pub mod statistics;
58#[cfg(feature = "support")]
59pub mod support;
60#[cfg(feature = "svm")]
61pub mod svm;
62#[cfg(feature = "transform")]
63pub mod transform;
64pub mod types;
65#[cfg(feature = "window")]
66pub mod window;
67
68#[cfg(feature = "basic-math")]
69pub use basic_math::*;
70#[cfg(feature = "bayes")]
71pub use bayes::*;
72#[cfg(feature = "complex-math")]
73pub use complex_math::*;
74#[cfg(feature = "controller")]
75pub use controller::*;
76#[cfg(feature = "distance")]
77pub use distance::*;
78#[cfg(feature = "fast-math")]
79pub use fast_math::*;
80#[cfg(feature = "filtering")]
81pub use filtering::*;
82#[cfg(feature = "fixed-point")]
83pub use fixed_point::*;
84#[cfg(feature = "interpolation")]
85pub use interpolation::*;
86pub use math::*;
87#[cfg(feature = "matrix")]
88pub use matrix::*;
89#[cfg(feature = "quaternion")]
90pub use quaternion::*;
91#[cfg(feature = "statistics")]
92pub use statistics::*;
93#[cfg(feature = "support")]
94pub use support::*;
95#[cfg(feature = "svm")]
96pub use svm::*;
97#[cfg(feature = "transform")]
98pub use transform::*;
99pub use types::*;
100#[cfg(feature = "window")]
101pub use window::*;