Repository navigation
Module_Extensions_FFTW
Location: Home / FFTW extension
Vorcyc.Mathematics.Extensions.FFTW is a standalone NuGet package that provides a .NET wrapper around the FFTW (Fastest Fourier Transform in the West) native library. The extension depends on the main library Vorcyc.Mathematics and uses its PinnableArray<T>, ComplexFp32, Complex<T>, and related types for efficient memory pinning and complex arithmetic.
Assembly name: Vorcyc.Mathematics.Extensions.FFTW
Namespace: Vorcyc.Mathematics.Extensions.FFTW
Package version: 0.10.20 (aligned withVorcyc.Mathematics; no FFTW API change)
Dependencies: Vorcyc.Mathematics (main library) + FFTW native DLL (shipped with the package underruntimes/win-x64/native)
📒Contents
- 🔖 Single-precision DFT
- 🔖 Double-precision DFT
- 🔖 HilbertTransform class
- 🔖 EnvelopeComputer class
- 🔖 SignalExtension class
- 🔖 PinnableArraySignalExtension class
The following classes are static (partial) classes in namespace Vorcyc.Mathematics.Extensions.FFTW. Input/output uses ComplexFp32 (single-precision complex) or float.
Provides static methods for one-dimensional discrete Fourier transforms, wrapping the FFTW single-precision interface.
| Method | Description |
|---|---|
Forward(...) |
Complex-to-complex forward DFT (non-in-place) |
Inverse(...) |
Complex-to-complex inverse DFT (non-in-place) |
ForwardInPlace(...) |
Complex-to-complex forward DFT (in-place) |
InverseInPlace(...) |
Complex-to-complex inverse DFT (in-place) |
Forward(ReadOnlySpan<float>, ...) |
Real-to-complex (R2C) forward DFT |
Inverse(..., Span<float>, ...) |
Complex-to-real (C2R) inverse DFT |
Each method provides overloads for PinnableArray<T>, Span<T>, and raw pointers.
Note: FFTW does not normalize by default; inverse transforms typically require scaling by
1/N. C2R overloads provide an optionalscaleparameter.
Provides forward and inverse two-dimensional complex-to-complex (C2C) DFT.
| Method | Description |
|---|---|
Forward(input, output, nx, ny, ...) |
2D C2C forward DFT |
Inverse(input, output, nx, ny, ...) |
2D C2C inverse DFT |
Provides forward and inverse three-dimensional complex-to-complex (C2C) DFT.
| Method | Description |
|---|---|
Forward(input, output, nx, ny, nz, ...) |
3D C2C forward DFT |
Inverse(input, output, nx, ny, nz, ...) |
3D C2C inverse DFT |
Provides C2C, R2C, and C2R transforms of arbitrary dimensionality.
| Method | Description |
|---|---|
Forward(input, output, dims, ...) |
N-dimensional C2C forward DFT |
Inverse(input, output, dims, ...) |
N-dimensional C2C inverse DFT |
Forward(ReadOnlySpan<float>, ..., dims) |
N-dimensional R2C forward DFT |
Inverse(..., Span<float>, dims, ...) |
N-dimensional C2R inverse DFT |
Real-to-real (R2R) transforms based on FFTW fftw_kind, supporting 1D / 2D / 3D / N-D.
| Method | Description |
|---|---|
R2HC1D(...) |
1D real-to-half-complex spectrum |
HC2R1D(...) |
1D half-complex spectrum to real |
DHT1D(...) |
1D discrete Hartley transform |
R2R_2D(...) |
2D R2R transform |
R2R_3D(...) |
3D R2R transform |
R2R_ND(...) |
N-dimensional R2R transform |
| Method | Description |
|---|---|
EstimateFlops(...) |
Estimates floating-point operations for a 1D C2C DFT (adds, muls, fmas) |
PrintPlan(...) |
Prints a human-readable description of an FFTW plan |
Structurally identical to the single-precision version, using Complex<double> or double types. All classes are partial and share class names with the single-precision classes (organized across partial files).
Double-precision 1D C2C, R2C, and C2R transforms; API is symmetric with the single-precision version.
Double-precision 2D C2C transforms.
Double-precision 3D C2C transforms.
Double-precision C2C, R2C, and C2R transforms of arbitrary dimensionality.
Double-precision R2R transforms (1D / 2D / 3D / N-D); API is symmetric with the single-precision version.
Double-precision FLOPs estimation and plan printing utilities.
Computes the Hilbert transform of real-valued signals using FFT-based analytic signal construction. Commonly used to form analytic signals, extract instantaneous phase and amplitude, or perform envelope detection.
| Method | Description |
|---|---|
ComputeHilbertTransform(ReadOnlySpan<float>) |
Computes the Hilbert transform of a single-precision real-valued signal |
ComputeHilbertTransform(ReadOnlySpan<double>) |
Computes the Hilbert transform of a double-precision real-valued signal |
Computes signal envelopes using the Hilbert transform and peak detection.
| Value | Description |
|---|---|
Symmetric |
Lower envelope is the negation of the upper envelope (assumes signal oscillates symmetrically around zero) |
Independent |
Lower envelope is computed independently (negate the signal first, then apply the Hilbert transform) |
| Method | Description |
|---|---|
ComputeHilbertEnvelope(...) |
Computes upper/lower envelopes of a signal |
Provides FFTW-based frequency-domain transform extension methods for the standard SignalProcessing.Signals APIs (Signal, SignalSegment, ModifiableTimeDomainSignal). Because FFTW supports DFT of arbitrary length, signals do not need to be zero-padded to a power of two.
| Extension target | Method | Description |
|---|---|---|
Signal |
TransformToFrequencyDomainFFTW(WindowType?) |
Transforms a signal to the frequency domain, with optional window function |
SignalSegment |
TransformToFrequencyDomainFFTW(WindowType?) |
Transforms a signal segment to the frequency domain |
ModifiableTimeDomainSignal |
TransformToFrequencyDomainFFTW(WindowType?) |
Transforms a modifiable signal to the frequency domain |
Provides signal/spectrum-related extension methods for PinnableArray<float> and PinnableArray<double>.
| Extension target | Method | Description |
|---|---|---|
PinnableArray<float> |
ScaleInPlace() |
Scales in place by 1/N (for inverse FFT normalization) |
PinnableArray<double> |
ScaleInPlace() |
Scales in place by 1/N (double-precision version) |
-
- 🔖 ArrayExtension class
- 🔖 BaseConverter class
- 🔖 BitMathExtension class
- 🔖 Combinatorics class
- 🔖 ConstantsFp32 class
- 🔖 NumberMapper class
- 🔖 PinnableArray<T> class
- 🔖 SimpleRNG_Fp32 and SimpleRNG_Fp64 classes
- 🔖 TrigonometryHelper class
- 🔖 VMath class
- 🔖 Pinned buffers (Buffers)
- 🔖 IPinnedBuffer<T> interface
- 🔖 POHBuffer<T> class
- 🔖 NativeBuffer<T> class
-
- 🔖 0.9 classifier walkthrough
- 🔖 KNN<T> class
- 🔖 MultipleLinearRegression<T> class
- 🔖 SimpleLinearRegression<T> class
- 🔖 SupportVectorMachine<TSelf> class
- 🔖 DBSCAN<T> class
- 🔖 ExpectationMaximization<T> class
- 🔖 GMM<T> class
- 🔖 HierarchicalClustering<T> class
- 🔖 KMeansClusterer<T> class
- 🔖 VectorQuantization<T> class
- 🔖 FactorAnalysis<T> class
- 🔖 PCA<TSelf> class
- 🔖 TSNE<T> class
- 🔖 Distance metric classes
-
📒 Examples
-
📒 GPU 策略说明
- 🔖 为何放弃主包 GPU
- 🔖 当前性能路径
- 🔖 若仍需要更强算力
-
📒 计算上下文模块
-
📒 核心模块
-
📒 深度学习模块
-
📒 线性代数模块
-
📒 机器学习模块
- 🔖 0.9 分类器完整示例
- 🔖 KNN<T> 类
- 🔖 MultipleLinearRegression<T> 类
- 🔖 SimpleLinearRegression<T> 类
- 🔖 SupportVectorMachine<TSelf> 类
- 🔖 DBSCAN<T> 类
- 🔖 ExpectationMaximization<T> 类
- 🔖 GMM<T> 类
- 🔖 HierarchicalClustering<T> 类
- 🔖 KMeansClusterer<T> 类
- 🔖 VectorQuantization<T> 类
- 🔖 FactorAnalysis<T> 类
- 🔖 PCA<TSelf> 类
- 🔖 TSNE<T> 类
- 🔖 距离度量类
-
📒 信号处理模块
-
📒 数值模块
-
📒 统计模块
- 🔖 基础统计函数
- 🔖 高级统计函数
- 🔖 稳健统计 / RunningMoments
- 🔖 其它统计函数
- 🔖 分布相关函数
- 🔖 时间序列分析
- 🔖 IComparable 扩展
- 🔖 ExtremeValueFinder
- 🔖 INumber 扩展
-
📒 FFTW 扩展
-
📒 示例