1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
//! # embedded-dsp
//!
//! A `#![no_std]` Rust digital signal processing library for microcontrollers, embedded systems, and real-time signal processing applications.
//!
//! Algorithm modules are Cargo-feature gated (all enabled by the `full` feature, which is
//! in `default`). `types` and `math` are always available. See the crate's `[features]`
//! table for the per-module flags.
//!
//! ## Overview
//!
//! `embedded-dsp` provides zero-allocation digital signal processing algorithms:
//!
//! - **Basic Math**: Elementwise addition, subtraction, multiplication, dot product, scale, shift, clip, logic ops.
//! - **Complex Math**: Complex vector addition, multiplication, magnitude, magnitude squared, conjugate, dot product.
//! - **Fast Math**: Trigonometric (sin, cos, atan2), square root, division, log, exp.
//! - **Fixed-Point (Q16.16)**: Saturating Q16.16 arithmetic and scanline interpolation (`fixed-point` feature).
//! - **LUT trigonometry**: Compile-time 256-entry sin/cos tables (`lut` feature).
//! - **Statistics**: Mean, variance, standard deviation, RMS, power, min/max, entropy, Kullback-Leibler, LogSumExp.
//! - **Support**: Vector copy, fill, type conversions (Q7, Q15, Q31, F32), sort, barycenter, weighted sum.
//! - **Matrix**: Matrix addition, subtraction, multiplication, scale, transpose, Gauss-Jordan inverse.
//! - **Filtering**: FIR, Biquad IIR Direct Form I and transposed DF-II (f32/q15/q31), LMS / leaky LMS / NLMS, Convolution, Correlation, single-pole recursive filters (f32/q15), Q15 DC blocker, O(1) recursive moving average, and a double-sampled State Variable Filter (simultaneous LP/HP/BP/notch/peak, sweepable cutoff/resonance).
//! - **Filter Design**: Biquad Lowpass, Highpass, Bandpass, Notch, Peaking EQ, Allpass, Butterworth, Chebyshev, and arbitrary-response (frequency-sampling) design.
//! - **Filter Analysis**: Frequency response (DTFT) evaluation for FIR/biquad filters, FIR group delay, and pole-based IIR stability checks.
//! - **Resampling & Multi-rate**: CIC Decimator & Interpolator, linear fractional resampler.
//! - **Kalman Filtering**: 1D/2D helpers, const-generic linear `KalmanFilter<N, M>`, and trait-based `ExtendedKalmanFilter` (EKF).
//! - **Const Generics**: Compile-time fixed-size `FirFilter<N>`, `FirFilterQ15<N>`, `BiquadCascade<N>`, `BiquadCascadeQ15`, and `Matrix<R, C>`.
//! - **Transform**: In-place Complex FFT (CFFT), packed Real FFT / inverse (`rfft_q15`/`irfft_q15`), DCT-IV, Bit reversal, Fixed-point FFT (Q15/Q31), Haar transform, Hartley transform, and a generalized wavelet transform (Daubechies-4).
//! - **Companding**: ยต-law and A-law curves plus ITU-T G.711 `u8` encode/decode.
//! - **Audio**: Goertzel single-frequency detector (f32/q15), peak/RMS envelope followers (f32/q15), Mel filterbank, and MFCC feature extraction.
//! - **Spectral Analysis & PSD**: Welch's method power spectral density estimation (averaged periodograms), single-segment periodograms in linear and dB scale.
//! - **Spatial & 2D Signal Processing**: 2D DCT/IDCT, 2D Convolution, 2D Non-linear Filtering (Min/Max/Median), Sobel edge detection, 2D Histogram, MSE, PSNR.
//! - **Controller**: PID motor controller, Clarke/Park (f32 and q15).
//! - **Interpolation**: Linear, Bilinear, Cubic spline interpolation.
//! - **Quaternion**: Norm, normalization, product, conjugate, inverse, rotation matrix conversion, and `nalgebra` interop (`nalgebra` feature).
//! - **Window**: Hanning, Hamming, Blackman, Blackman-Harris, Bartlett, Welch, Flat-top generators (f32), plus Q15 Hanning/Hamming/Blackman/Bartlett.
//! - **Distance**: Euclidean, Cosine, Chebyshev, Manhattan, Minkowski, Jaccard, Hamming, Canberra, Bray-Curtis.
extern crate std;
gated_mod!;
gated_mod!;
gated_mod!;
gated_mod!;
gated_mod!;
gated_mod!;
gated_mod!;
gated_mod!;
gated_mod!;
gated_mod!;
gated_mod!;
gated_mod!;
gated_mod!;
gated_mod!;
gated_mod!;
gated_mod!;
gated_mod!;
gated_mod!;
gated_mod!;
gated_mod!;
gated_mod!;
gated_mod!;
gated_mod!;
gated_mod!;
gated_mod!;
gated_mod!;
gated_mod!;
gated_mod!;
gated_mod!;
gated_mod!;
gated_mod!;
pub use *;
pub use *;
pub use *;