General 1D FFT class assuming the behavior of the provided FFT configuration instance.
Namespace:
CenterSpace.NMath.CoreAssembly: NMath (in NMath.dll) Version: 5.1.0.0
Syntax
| C# |
|---|
[SerializableAttribute] public class FloatGeneral1DFFT : FFTBase, ICloneable |
| Visual Basic (Declaration) |
|---|
<SerializableAttribute> _ Public Class FloatGeneral1DFFT _ Inherits FFTBase _ Implements ICloneable |
| Visual C++ |
|---|
[SerializableAttribute] public ref class FloatGeneral1DFFT : public FFTBase, ICloneable |
Remarks
This general 1D FFT class can process signals with complex memory configurations with
offset and strided signals.
This class is designed for advanced users, and if the configuration does not
correctly match the layout and type of the input signal data, exceptions and erroneous
outputs will result.
Examples
This is an example of using the FloatGeneral1DFFT class to compute a FFT of an offset and strided signal.
CopyC#
// Offset, and strided 1D signal layout. // The actual signal is of length 4, and is: {2, 3, 4, 5} float[] signal = { 9423423, 2, -111, 3, -111, 4, -111, 5 }; // Build the FFTConfiguration instance which describes the FFT to be computed. FFTConfiguration config= new FFTConfiguration(FFTDirection.FORWARD, FFTPrecision.FLOAT, FFTDomain.REAL, 1, 4); config.DataOffset = 1; config.DataStride = 2; // Create the FFT with the given configuration. FloatGeneral1DFFT gfft4 = new FloatGeneral1DFFT(config); // Compute the the real in-place FFT. // The array, signal, will now contain the FFT(signal) = { 9423423, 14, -111, -2, -111, 2, -111, -2 }; // Which is a packed complex-conjugate symmetric FFT, with offset of 1, and a data stride of 2. // Unpacked, and unstrided, the full FFT(signal) would be { 14, -2+2i, -2, -2-2i }; gfft4.FFTInPlace(signal);