Namespaces

Types in MathNet.Numerics.IntegralTransforms

Type Fourier

Namespace MathNet.Numerics.IntegralTransforms

Complex Fast (FFT) Implementation of the Discrete Fourier Transform (DFT).

Static Functions

Public Static Functions

void BluesteinForward(Complex[] samples, FourierOptions options)

Bluestein forward FFT for arbitrary sized sample vectors.
Parameters
Complex[] samples

Sample vector, where the FFT is evaluated in place.

FourierOptions options

Fourier Transform Convention Options.

void BluesteinInverse(Complex[] spectrum, FourierOptions options)

Bluestein inverse FFT for arbitrary sized sample vectors.
Parameters
Complex[] spectrum

Sample vector, where the FFT is evaluated in place.

FourierOptions options

Fourier Transform Convention Options.

void Forward(Complex[] samples)

Applies the forward Fast Fourier Transform (FFT) to arbitrary-length sample vectors.
Parameters
Complex[] samples

Sample vector, where the FFT is evaluated in place.

void Forward(Complex[] samples, FourierOptions options)

Applies the forward Fast Fourier Transform (FFT) to arbitrary-length sample vectors.
Parameters
Complex[] samples

Sample vector, where the FFT is evaluated in place.

FourierOptions options

Fourier Transform Convention Options.

void Forward(Double[] real, Double[] imaginary, FourierOptions options)

Applies the forward Fast Fourier Transform (FFT) to arbitrary-length sample vectors.
Parameters
Double[] real

Real part of the sample vector, where the FFT is evaluated in place.

Double[] imaginary

Imaginary part of the sample vector, where the FFT is evaluated in place.

FourierOptions options

Fourier Transform Convention Options.

void Forward2D(Complex[] samplesRowWise, int rows, int columns, FourierOptions options)

Applies the forward Fast Fourier Transform (FFT) to two dimensional sample data.
Data available organized column by column instead of row by row can be processed directly by swapping the rows and columns arguments.
Parameters
Complex[] samplesRowWise

Sample data, organized row by row, where the FFT is evaluated in place

int rows

The number of rows.

int columns

The number of columns.

FourierOptions options

Fourier Transform Convention Options.

void Forward2D(Matrix<T> samples, FourierOptions options)

Applies the forward Fast Fourier Transform (FFT) to a two dimensional data in form of a matrix.
Parameters
Matrix<T> samples

Sample matrix, where the FFT is evaluated in place

FourierOptions options

Fourier Transform Convention Options.

void ForwardMultiDim(Complex[] samples, Int32[] dimensions, FourierOptions options)

Applies the forward Fast Fourier Transform (FFT) to multiple dimensional sample data.
Parameters
Complex[] samples

Sample data, where the FFT is evaluated in place.

Int32[] dimensions

The data size per dimension. The first dimension is the major one. For example, with two dimensions "rows" and "columns" the samples are assumed to be organized row by row.

FourierOptions options

Fourier Transform Convention Options.

void ForwardReal(Double[] data, int n, FourierOptions options)

Packed Real-Complex forward Fast Fourier Transform (FFT) to arbitrary-length sample vectors. Since for real-valued time samples the complex spectrum is conjugate-even (symmetry), the spectrum can be fully reconstructed form the positive frequencies only (first half). The data array needs to be N+2 (if N is even) or N+1 (if N is odd) long in order to support such a packed spectrum.
Parameters
Double[] data

Data array of length N+2 (if N is even) or N+1 (if N is odd).

int n

The number of samples.

FourierOptions options

Fourier Transform Convention Options.

Double[] FrequencyScale(int length, double sampleRate)

Generate the frequencies corresponding to each index in frequency space. The frequency space has a resolution of sampleRate/N. Index 0 corresponds to the DC part, the following indices correspond to the positive frequencies up to the Nyquist frequency (sampleRate/2), followed by the negative frequencies wrapped around.
Parameters
int length

Number of samples.

double sampleRate

The sampling rate of the time-space data.

void Inverse(Double[] real, Double[] imaginary, FourierOptions options)

Applies the inverse Fast Fourier Transform (iFFT) to arbitrary-length sample vectors.
Parameters
Double[] real

Real part of the sample vector, where the iFFT is evaluated in place.

Double[] imaginary

Imaginary part of the sample vector, where the iFFT is evaluated in place.

FourierOptions options

Fourier Transform Convention Options.

void Inverse(Complex[] spectrum, FourierOptions options)

Applies the inverse Fast Fourier Transform (iFFT) to arbitrary-length sample vectors.
Parameters
Complex[] spectrum

Spectrum data, where the iFFT is evaluated in place.

FourierOptions options

Fourier Transform Convention Options.

void Inverse(Complex[] spectrum)

Applies the inverse Fast Fourier Transform (iFFT) to arbitrary-length sample vectors.
Parameters
Complex[] spectrum

Spectrum data, where the iFFT is evaluated in place.

void Inverse2D(Matrix<T> spectrum, FourierOptions options)

Applies the inverse Fast Fourier Transform (iFFT) to a two dimensional data in form of a matrix.
Parameters
Matrix<T> spectrum

Sample matrix, where the iFFT is evaluated in place

FourierOptions options

Fourier Transform Convention Options.

void Inverse2D(Complex[] spectrumRowWise, int rows, int columns, FourierOptions options)

Applies the inverse Fast Fourier Transform (iFFT) to two dimensional sample data.
Data available organized column by column instead of row by row can be processed directly by swapping the rows and columns arguments.
Parameters
Complex[] spectrumRowWise

Sample data, organized row by row, where the iFFT is evaluated in place

int rows

The number of rows.

int columns

The number of columns.

FourierOptions options

Fourier Transform Convention Options.

void InverseMultiDim(Complex[] spectrum, Int32[] dimensions, FourierOptions options)

Applies the inverse Fast Fourier Transform (iFFT) to multiple dimensional sample data.
Parameters
Complex[] spectrum

Spectrum data, where the iFFT is evaluated in place.

Int32[] dimensions

The data size per dimension. The first dimension is the major one. For example, with two dimensions "rows" and "columns" the samples are assumed to be organized row by row.

FourierOptions options

Fourier Transform Convention Options.

void InverseReal(Double[] data, int n, FourierOptions options)

Packed Real-Complex inverse Fast Fourier Transform (iFFT) to arbitrary-length sample vectors. Since for real-valued time samples the complex spectrum is conjugate-even (symmetry), the spectrum can be fully reconstructed form the positive frequencies only (first half). The data array needs to be N+2 (if N is even) or N+1 (if N is odd) long in order to support such a packed spectrum.
Parameters
Double[] data

Data array of length N+2 (if N is even) or N+1 (if N is odd).

int n

The number of samples.

FourierOptions options

Fourier Transform Convention Options.

Complex[] NaiveForward(Complex[] samples, FourierOptions options)

Naive forward DFT, useful e.g. to verify faster algorithms.
Parameters
Complex[] samples

Time-space sample vector.

FourierOptions options

Fourier Transform Convention Options.

Return
Complex[]

Corresponding frequency-space vector.

Complex[] NaiveInverse(Complex[] spectrum, FourierOptions options)

Naive inverse DFT, useful e.g. to verify faster algorithms.
Parameters
Complex[] spectrum

Frequency-space sample vector.

FourierOptions options

Fourier Transform Convention Options.

Return
Complex[]

Corresponding time-space vector.

void Radix2Forward(Complex[] samples, FourierOptions options)

Radix-2 forward FFT for power-of-two sized sample vectors.
Parameters
Complex[] samples

Sample vector, where the FFT is evaluated in place.

FourierOptions options

Fourier Transform Convention Options.

void Radix2Inverse(Complex[] spectrum, FourierOptions options)

Radix-2 inverse FFT for power-of-two sized sample vectors.
Parameters
Complex[] spectrum

Sample vector, where the FFT is evaluated in place.

FourierOptions options

Fourier Transform Convention Options.