Loading [MathJax]/extensions/TeX/AMSsymbols.js
Automatic Differentiation
 
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Loading...
Searching...
No Matches

◆ autocorrelation() [1/4]

template<typename T >
void stan::math::autocorrelation ( const std::vector< T > &  y,
std::vector< T > &  ac,
Eigen::FFT< T > &  fft 
)

Write autocorrelation estimates for every lag for the specified input sequence into the specified result using the specified FFT engine.

The return vector be resized to the same length as the input sequence with lags given by array index.

The implementation involves a fast Fourier transform, followed by a normalization, followed by an inverse transform.

An FFT engine can be created for reuse for type double with:

    Eigen::FFT<double> fft;
Template Parameters
TScalar type.
Parameters
yInput sequence.
acAutocorrelations.
fftFFT engine instance.

Definition at line 62 of file autocorrelation.hpp.