Stan Math Library
4.9.0
Automatic Differentiation
|
void stan::math::autocovariance | ( | const Eigen::MatrixBase< DerivedA > & | y, |
Eigen::MatrixBase< DerivedB > & | acov, | ||
Eigen::FFT< T > & | fft | ||
) |
Write autocovariance 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;
T | scalar type |
DerivedA | type of the first matrix |
DerivedB | type of the second matrix |
y | Input sequence. |
acov | Autocovariance. |
fft | FFT engine instance. |
Definition at line 66 of file autocovariance.hpp.