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

◆ inv_fft() [2/2]

template<typename V , require_eigen_vector_vt< is_complex, V > * = nullptr, require_var_t< base_type_t< value_type_t< V > > > * = nullptr>
plain_type_t< V > stan::math::inv_fft ( const V &  y)
inline

Return the inverse discrete Fourier transform of the specified complex vector.

Given an input complex vector y[0:N-1] of size N, the inverse discrete Fourier transform computes entries of the resulting complex vector x[0:N-1] by

x[n] = SUM_{i < N} y[i] * exp(n * i * 2 * pi * sqrt(-1) / N)
fvar< T > sqrt(const fvar< T > &x)
Definition sqrt.hpp:17
static constexpr double pi()
Return the value of pi.
Definition constants.hpp:36
fvar< T > exp(const fvar< T > &x)
Definition exp.hpp:13
  • The adjoint computation is given by
    adjoint(y) += (1 / length(x)) * fft(adjoint(x))
    Eigen::Matrix< scalar_type_t< V >, -1, 1 > fft(const V &x)
    Return the discrete Fourier transform of the specified complex vector.
    Definition fft.hpp:35

If the input is of size zero, the result is a size zero vector. The only difference between the discrete DFT and its inverse is the sign of the exponent.

Template Parameters
Vtype of complex vector argument
Parameters
[in]yvector to inverse transform
Returns
inverse discrete Fourier transform of y

Definition at line 87 of file fft.hpp.