Automatic Differentiation
 
Loading...
Searching...
No Matches

◆ fft2() [2/2]

template<typename M , require_eigen_dense_dynamic_vt< is_complex, M > * = nullptr, require_var_t< base_type_t< value_type_t< M > > > * = nullptr>
plain_type_t< M > stan::math::fft2 ( const M &  x)
inline

Return the two-dimensional discrete Fourier transform of the specified complex matrix.

The 2D discrete Fourier transform first runs the discrete Fourier transform on the each row, then on each column of the result.

The adjoint computation is given by

adjoint(x) += size(y) * inv_fft2(adjoint(y))
int64_t size(const T &m)
Returns the size (number of the elements) of a matrix_cl or var_value<matrix_cl<T>>.
Definition size.hpp:19
Eigen::Matrix< scalar_type_t< M >, -1, -1 > inv_fft2(const M &y)
Return the two-dimensional inverse discrete Fourier transform of the specified complex matrix.
Definition fft.hpp:109
Template Parameters
Mtype of complex matrix argument
Parameters
[in]xmatrix to transform
Returns
discrete 2D Fourier transform of x

Definition at line 122 of file fft.hpp.