Transforms & Spectral Analysis (algebrax.transforms)¶
The transforms namespace provides discrete spectral, time-frequency, and convex analysis tools:
dft&idft: Discrete Fourier Transform and inverse for spatial frequency spectra.walsh_hadamard: Orthogonal Hadamard-Walsh dyadic spectral decomposition.hilbert: Hilbert transform for analytical signal envelope extraction.z_transform: Complex frequency \(Z\)-plane transfer function evaluation.convolve: Generalized 2D spatial convolution over arbitrary semirings.legendre_fenchel: Convex dual conjugate transformation.
Walsh-Hadamard Transform (Boolean Hypercube Parity)¶
The Walsh-Hadamard Transform (WHT) computes orthogonal hypercube transformations over \(\mathbb{Z}_2^n\) using bitwise XOR parity.
It maps a discrete signal \(x[m]\) to frequency Walsh coefficients:
\[X[k] = \sum_{m=0}^{N-1} x[m] \cdot (-1)^{\text{popcount}(k \wedge m)}\]
where \(\text{popcount}(k \wedge m)\) is the bitwise XOR parity count.
Example Usage¶
2. Morphological Operations (Tropical & Arctic Semirings)¶
By swapping the underlying algebraic semiring, convolve performs non-linear Mathematical Morphology:
- Morphological Dilation (Max-Plus / Arctic Semiring \((\max, +)\)): Computes max-pooling over the kernel footprint.
- Morphological Erosion (Min-Plus / Tropical Semiring \((\min, +)\)): Computes min-pooling over the kernel footprint.
Fenchel-Legendre Transform (Tropical Fourier)¶
The "Fourier Transform" for the Min-Plus semiring. It analyzes the "slope content" of a signal.
Related Recipes & Applications¶
- Optical Holography Simulation — Diffraction via
dft&idft. - Telecommunications & Fractal Networks — Orthogonal multiplexing via
walsh_hadamard. - Vibration Structural Analysis — Fatigue envelope detection via
hilbert. - Quantum Convex Optimization — Dual loss evaluation via
legendre_fenchel.