Fft2D<T>.ForwardTransform Method

Definition

Namespace: Numerics.NET.SignalProcessing
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.0

Overload List

ForwardTransform(Matrix<T>) Computes the discrete Fourier transform of a real signal and returns the result.
ForwardTransform(Matrix<Complex<T>>) Computes the discrete Fourier transform of a complex signal and returns the result.
ForwardTransform(DenseMatrix<T>, ComplexConjugateSignalMatrix<T>) Computes the discrete Fourier transform of a real signal.
ForwardTransform(DenseMatrix<Complex<T>>, DenseMatrix<Complex<T>>) Computes the discrete Fourier transform of a complex signal.
ForwardTransform(Matrix<T>, Matrix<Complex<T>>) Computes the discrete Fourier transform of a real signal.
ForwardTransform(Matrix<Complex<T>>, Matrix<Complex<T>>) Computes the discrete Fourier transform of a complex signal.
ForwardTransform(ReadOnlySpan2D<T>, Span2D<Complex<T>>) 
ForwardTransform(ReadOnlySpan2D<Complex<T>>, Span2D<Complex<T>>) 
ForwardTransform(Matrix<T>, Matrix<Complex<T>>, RealFftFormat) Computes the discrete Fourier transform of a real signal.
ForwardTransform(ReadOnlySpan<T>, Int32, Span<Complex<T>>, Int32) Computes the discrete Fourier transform of a real signal.
ForwardTransform(ReadOnlySpan<Complex<T>>, Int32, Span<Complex<T>>, Int32) Computes the discrete Fourier transform of a complex signal.
ForwardTransform<TStorage2D>(TStorage2D, TStorage2D) Computes the discrete Fourier transform of a complex signal.
ForwardTransform<TStorage2D, TComplexStorage2D>(TStorage2D, Array2D<Complex<T>>) Computes the discrete Fourier transform of a real signal.

ForwardTransform(Matrix<T>)

Computes the discrete Fourier transform of a real signal and returns the result.
C#
public ComplexConjugateSignalMatrix<T> ForwardTransform(
	Matrix<T> input
)

Parameters

input  Matrix<T>
A Double matrix containing the input signal.

Return Value

ComplexConjugateSignalMatrix<T>
A ComplexConjugateSignalMatrix<T>.

Remarks

The output is stored in a compact format to take advantage of the symmetry properties of a real Fourier transform.

Exceptions

ArgumentNullException

input is null.

ForwardTransform(Matrix<Complex<T>>)

Computes the discrete Fourier transform of a complex signal and returns the result.
C#
public DenseMatrix<Complex<T>> ForwardTransform(
	Matrix<Complex<T>> input
)

Parameters

input  Matrix<Complex<T>>
On input, a complex matrix containing the input signal. On return, the forward transform of the input.

Return Value

DenseMatrix<Complex<T>>

Exceptions

ArgumentNullException

input is null.

ForwardTransform<TStorage2D, TComplexStorage2D>(TStorage2D, Array2D<Complex<T>>)

Computes the discrete Fourier transform of a real signal.
C#
public void ForwardTransform<TStorage2D, TComplexStorage2D>(
	TStorage2D input,
	Array2D<Complex<T>> output
)
where TStorage2D : Object, IStorage2D<T>
where TComplexStorage2D : Object, IStorage2D<Complex<T>>

Parameters

input  TStorage2D
A real 2D array containing the input signal.
output  Array2D<Complex<T>>
A complex 2D array to hold the transformed signal.

Type Parameters

TStorage2D
TComplexStorage2D

Remarks

The output is stored in a compact format to take advantage of the symmetry properties of a real Fourier transform. Specifically, output contains only the first n/2+1 terms of the transformed signal.

Exceptions

InvalidOperationException

The Fourier transform implementation is not configured to accept real input.

ArgumentNullException

input is null.

-or-

output is null.

DimensionMismatchException

The length of input does not equal the length of output.

ForwardTransform(DenseMatrix<T>, ComplexConjugateSignalMatrix<T>)

Computes the discrete Fourier transform of a real signal.
C#
public void ForwardTransform(
	DenseMatrix<T> input,
	ComplexConjugateSignalMatrix<T> output
)

Parameters

input  DenseMatrix<T>
A Double matrix containing the input signal.
output  ComplexConjugateSignalMatrix<T>
A complex matrix to hold the transformed signal.

Remarks

The output is stored in a compact format to take advantage of the symmetry properties of a real Fourier transform. Specifically, output contains only the first n/2+1 terms of the transformed signal. Use the ComplexConjugateSignalMatrix<T> class to obtain a complex matrix that represents the complete signal.

Exceptions

InvalidOperationException

The Fourier transform implementation is not configured to accept real input.

ArgumentNullException

input is null.

-or-

output is null.

DimensionMismatchException

The length of input does not equal the length of output.

ForwardTransform(DenseMatrix<Complex<T>>, DenseMatrix<Complex<T>>)

Computes the discrete Fourier transform of a complex signal.
C#
public void ForwardTransform(
	DenseMatrix<Complex<T>> input,
	DenseMatrix<Complex<T>> output
)

Parameters

input  DenseMatrix<Complex<T>>
A complex dense matrix containing the input signal.
output  DenseMatrix<Complex<T>>
A complex dense matrix to hold the transformed signal.

Exceptions

ArgumentNullException

input is null.

-or-

output is null.

DimensionMismatchException

The length of input does not equal the length of output.

ForwardTransform<TStorage2D>(TStorage2D, TStorage2D)

Computes the discrete Fourier transform of a complex signal.
C#
public void ForwardTransform<TStorage2D>(
	TStorage2D input,
	TStorage2D output
)
where TStorage2D : Object, IStorage2D<Complex<T>>

Parameters

input  TStorage2D
A complex 2D array containing the input signal.
output  TStorage2D
A complex 2D array to hold the transformed signal.

Type Parameters

TStorage2D

Exceptions

ArgumentNullException

input is null.

-or-

output is null.

DimensionMismatchException

The length of input does not equal the length of output.

ForwardTransform(Matrix<T>, Matrix<Complex<T>>)

Computes the discrete Fourier transform of a real signal.
C#
public void ForwardTransform(
	Matrix<T> input,
	Matrix<Complex<T>> output
)

Parameters

input  Matrix<T>
A Double matrix containing the input signal.
output  Matrix<Complex<T>>
A complex matrix to hold the transformed signal.

Remarks

The output is stored in a compact format to take advantage of the symmetry properties of a real Fourier transform. Specifically, output contains only the first n/2+1 terms of the transformed signal. Use the ComplexConjugateSignalMatrix<T> class to obtain a complex matrix that represents the complete signal.

Exceptions

ArgumentNullException

input is null.

-or-

output is null.

ForwardTransform(Matrix<Complex<T>>, Matrix<Complex<T>>)

Computes the discrete Fourier transform of a complex signal.
C#
public void ForwardTransform(
	Matrix<Complex<T>> input,
	Matrix<Complex<T>> output
)

Parameters

input  Matrix<Complex<T>>
A complex matrix containing the input signal.
output  Matrix<Complex<T>>
A complex matrix to hold the transformed signal.

Exceptions

ArgumentNullException

input is null.

-or-

output is null.

ForwardTransform(ReadOnlySpan2D<T>, Span2D<Complex<T>>)

C#
public void ForwardTransform(
	ReadOnlySpan2D<T> input,
	Span2D<Complex<T>> output
)

Parameters

input  ReadOnlySpan2D<T>
 
output  Span2D<Complex<T>>
 

ForwardTransform(ReadOnlySpan2D<Complex<T>>, Span2D<Complex<T>>)

C#
public void ForwardTransform(
	ReadOnlySpan2D<Complex<T>> input,
	Span2D<Complex<T>> output
)

Parameters

input  ReadOnlySpan2D<Complex<T>>
 
output  Span2D<Complex<T>>
 

ForwardTransform(Matrix<T>, Matrix<Complex<T>>, RealFftFormat)

Computes the discrete Fourier transform of a real signal.
C#
public void ForwardTransform(
	Matrix<T> input,
	Matrix<Complex<T>> output,
	RealFftFormat outputFormat
)

Parameters

input  Matrix<T>
A Double matrix containing the input signal.
output  Matrix<Complex<T>>
A complex matrix to hold the transformed signal.
outputFormat  RealFftFormat
A RealFftFormat value that specifies whether to return a one-sided or a two-sided transform.

Remarks

Use this method to compute the Fourier transform of a real signal. The outputFormat specifies whether the return value should contain the full complex transform (TwoSided), or only the first n/2+1 terms of the transformed signal (OneSided), where n is the length of the transform.

Exceptions

InvalidOperationException

The Fourier transform implementation is not configured to accept real input.

ArgumentNullException

input is null.

-or-

output is null.

ArgumentOutOfRangeException

outputFormat is not a valid RealFftFormat value.

DimensionMismatchException

outputFormat equals OneSided and the length of output does not equal half the length of input plus one.

-or-

outputFormat equals TwoSided and the length of input does not equal the length of output.

ForwardTransform(ReadOnlySpan<T>, Int32, Span<Complex<T>>, Int32)

Computes the discrete Fourier transform of a real signal.
C#
public abstract void ForwardTransform(
	ReadOnlySpan<T> input,
	int inputLeadingDimension,
	Span<Complex<T>> output,
	int outputLeadingDimension
)

Parameters

input  ReadOnlySpan<T>
A span containing a real 2D array containing the input signal.
inputLeadingDimension  Int32
The number of elements between the start of successive columns in input.
output  Span<Complex<T>>
A span containing a complex 2D array to hold the transformed signal.
outputLeadingDimension  Int32
The number of elements between the start of successive columns in output.

Remarks

The output is stored in a compact format to take advantage of the symmetry properties of a real Fourier transform. Specifically, output contains only the first n/2+1 terms of the transformed signal.

Exceptions

InvalidOperationException

The Fourier transform implementation is not configured to accept real input.

ForwardTransform(ReadOnlySpan<Complex<T>>, Int32, Span<Complex<T>>, Int32)

Computes the discrete Fourier transform of a complex signal.
C#
public abstract void ForwardTransform(
	ReadOnlySpan<Complex<T>> input,
	int inputLeadingDimension,
	Span<Complex<T>> output,
	int outputLeadingDimension
)

Parameters

input  ReadOnlySpan<Complex<T>>
A span containing a complex 2D array containing the input signal.
inputLeadingDimension  Int32
The number of elements between the start of successive columns in input.
output  Span<Complex<T>>
A span containing a complex 2D array to hold the transformed signal.
outputLeadingDimension  Int32
The number of elements between the start of successive columns in output.

See Also