Function vector_autocorr_vector (o2scl)¶
-
template<class vec_t, class resize_vec_t>
void o2scl::vector_autocorr_vector(size_t n, const vec_t &data, resize_vec_t &ac_vec, size_t kmax = 0, int verbose = 0)¶ Construct an autocorrelation vector.
This constructs a vector
ac_vec
for which the kth entry stores the lag-k autocorrelation. This function chooses \( k_{\mathrm{max}} =n/2 \) where \( n \) is the length of thedata
vector. The vectorac_vec
is resized to accomodate exactly \( k_{\mathrm{max}} \) values, from 0 to \( k_{\mathrm{max}}-1 \).