SignalMath.FourierTransform Method

Definition

Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.0.0

Overload List

FourierTransform<T>(Vector<T>) Computes the forward discrete Fourier transform of a real-valued vector and returns the result.
FourierTransform<T>(Vector<Complex<T>>) Computes the forward discrete Fourier transform of a complex-valued vector and returns the result.
FourierTransform<T>(ReadOnlySpan<T>, Span<Complex<T>>) Computes the forward discrete Fourier transform of a real signal.
FourierTransform<T>(ReadOnlySpan<Complex<T>>, Span<Complex<T>>) Computes the forward discrete Fourier transform of a complex signal.
FourierTransform<T>(Vector<T>, Vector<Complex<T>>) Computes the forward discrete Fourier transform of a real-valued vector.
FourierTransform<T>(Vector<Complex<T>>, Vector<Complex<T>>) Computes the forward discrete Fourier transform of a complex-valued vector.
FourierTransform<T>(Int32, ReadOnlySpan<T>, Int32, Span<Complex<T>>, Int32) Computes the forward discrete Fourier transform of a real signal.
FourierTransform<T>(Int32, ReadOnlySpan<Complex<T>>, Int32, Span<Complex<T>>, Int32) Computes the forward discrete Fourier transform of a complex signal.

FourierTransform<T>(Vector<T>)

Computes the forward discrete Fourier transform of a real-valued vector and returns the result.
C#
public static Vector<Complex<T>> FourierTransform<T>(
	Vector<T> input
)

Parameters

input  Vector<T>
The real-valued input vector.

Type Parameters

T
The element type (double or float).

Return Value

Vector<Complex<T>>
A complex-valued vector containing the frequency spectrum.

Exceptions

ArgumentNullException Thrown when input is null.

FourierTransform<T>(Vector<Complex<T>>)

Computes the forward discrete Fourier transform of a complex-valued vector and returns the result.
C#
public static Vector<Complex<T>> FourierTransform<T>(
	Vector<Complex<T>> input
)

Parameters

input  Vector<Complex<T>>
The complex-valued input vector.

Type Parameters

T
The element type (double or float).

Return Value

Vector<Complex<T>>
A complex-valued vector containing the frequency spectrum.

Exceptions

ArgumentNullException Thrown when input is null.

FourierTransform<T>(ReadOnlySpan<T>, Span<Complex<T>>)

Computes the forward discrete Fourier transform of a real signal.
C#
public static void FourierTransform<T>(
	ReadOnlySpan<T> realInput,
	Span<Complex<T>> result
)

Parameters

realInput  ReadOnlySpan<T>
A read-only span containing the real input signal.
result  Span<Complex<T>>
A span to hold the complex-valued frequency spectrum.

Type Parameters

T
The element type (double or float).

Exceptions

ArgumentException Thrown when the input and result dimensions do not match the expected sizes.

FourierTransform<T>(ReadOnlySpan<Complex<T>>, Span<Complex<T>>)

Computes the forward discrete Fourier transform of a complex signal.
C#
public static void FourierTransform<T>(
	ReadOnlySpan<Complex<T>> complexInput,
	Span<Complex<T>> result
)

Parameters

complexInput  ReadOnlySpan<Complex<T>>
A read-only span containing the complex input signal.
result  Span<Complex<T>>
A span to hold the complex-valued frequency spectrum.

Type Parameters

T
The element type (double or float).

Exceptions

ArgumentException Thrown when the input and result dimensions do not match.

FourierTransform<T>(Vector<T>, Vector<Complex<T>>)

Computes the forward discrete Fourier transform of a real-valued vector.
C#
public static void FourierTransform<T>(
	Vector<T> input,
	Vector<Complex<T>> output
)

Parameters

input  Vector<T>
The real-valued input vector.
output  Vector<Complex<T>>
The complex-valued output vector to hold the frequency spectrum.

Type Parameters

T
The element type (double or float).

Exceptions

ArgumentNullException Thrown when input or output is null.
ArgumentException Thrown when the output vector length does not match the expected spectrum size.

FourierTransform<T>(Vector<Complex<T>>, Vector<Complex<T>>)

Computes the forward discrete Fourier transform of a complex-valued vector.
C#
public static void FourierTransform<T>(
	Vector<Complex<T>> input,
	Vector<Complex<T>> output
)

Parameters

input  Vector<Complex<T>>
The complex-valued input vector.
output  Vector<Complex<T>>
The complex-valued output vector to hold the frequency spectrum.

Type Parameters

T
The element type (double or float).

Exceptions

ArgumentNullException Thrown when input or output is null.
ArgumentException Thrown when the input and output vector lengths do not match.

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

Computes the forward discrete Fourier transform of a real signal.
C#
public static void FourierTransform<T>(
	int length,
	ReadOnlySpan<T> realInput,
	int inputStride,
	Span<Complex<T>> result,
	int resultStride
)

Parameters

length  Int32
The number of elements in the input signal.
realInput  ReadOnlySpan<T>
A read-only span containing the real input signal.
inputStride  Int32
The stride between successive elements in realInput.
result  Span<Complex<T>>
A span to hold the complex-valued frequency spectrum.
resultStride  Int32
The stride between successive elements in result.

Type Parameters

T
The element type (double or float).

Exceptions

ArgumentException Thrown when the input and result dimensions do not match the expected sizes.

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

Computes the forward discrete Fourier transform of a complex signal.
C#
public static void FourierTransform<T>(
	int length,
	ReadOnlySpan<Complex<T>> complexInput,
	int inputStride,
	Span<Complex<T>> result,
	int resultStride
)

Parameters

length  Int32
The number of elements in the input signal.
complexInput  ReadOnlySpan<Complex<T>>
A read-only span containing the complex input signal.
inputStride  Int32
The stride between successive elements in complexInput.
result  Span<Complex<T>>
A span to hold the complex-valued frequency spectrum.
resultStride  Int32
The stride between successive elements in result.

Type Parameters

T
The element type (double or float).

Exceptions

ArgumentException Thrown when the input and result dimensions do not match.

See Also