Function matrix_forward_fft (o2scl)¶
-
void o2scl::matrix_forward_fft(size_t m, size_t n, const std::vector<double> &data, std::vector<std::complex<double>> &fft)¶
A one-dimensional FFTW wrapper for a forward FFT of real data.
This function does not require any copying of the input or output arrays. The input matrix must be stored as a vector in row-major order. The FFTW_ESTIMATE flag is used and so little or no optimization of the FFTW algorithm is done. Given an input vector of size m times n, implying a matrix with size1() equal to m and and size2() equal to n, the output vector is resized to have size \( m(n/2+1) \) representing a matrix with size1() equal to m and size2() equal to \( (n/2+1) \), stored in row-major order.
Note
This function calls the error handler if was not compiled with FFTW support.