Template Function librapid::fft::rfft(array::ArrayContainer<ShapeType, Storage<StorageScalar>>&)#

Function Documentation#

template<typename ShapeType, typename StorageScalar>
auto librapid::fft::rfft(array::ArrayContainer<ShapeType, Storage<StorageScalar>> &array) -> Array<Complex<StorageScalar>, backend::CPU>#

Compute the real-valued discrete Fourier transform of a 1D array.

Given a 1D array of real numbers, compute the discrete Fourier transform of the array. This returns an array of length \(\frac{n}{2} + 1\) where \(n\) is the length of the input array. The returned array contains the non-redundant half of the resulting transform, since the other half can be obtained by taking the complex conjugate of the first half.

Template Parameters
  • ShapeType – The shape type of the input array

  • StorageScalar – The scalar type of the input array

Parameters

array – The input array

Returns

The discrete Fourier transform of the input array