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

◆ fft() [1/2]

template<typename V , require_eigen_vector_vt< is_complex, V > * = nullptr, require_not_var_t< base_type_t< value_type_t< V > > > * = nullptr>
Eigen::Matrix< scalar_type_t< V >, -1, 1 > stan::math::fft ( const V &  x)
inline

Return the discrete Fourier transform of the specified complex vector.

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

y[n] = SUM_{i < N} x[i] * exp(-n * i * 2 * pi * sqrt(-1) / N)
fvar< T > sqrt(const fvar< T > &x)
Definition sqrt.hpp:18
static constexpr double pi()
Return the value of pi.
Definition constants.hpp:36
fvar< T > exp(const fvar< T > &x)
Definition exp.hpp:15

If the input is of size zero, the result is a size zero vector.

Template Parameters
Vtype of complex vector argument
Parameters
[in]xvector to transform
Returns
discrete Fourier transform of x

Definition at line 35 of file fft.hpp.