Function vector_lag1_autocorr (o2scl)¶
-
template<class vec_t>
double o2scl::vector_lag1_autocorr(size_t n, const vec_t &data, double mean)¶ Lag-1 autocorrelation.
This function computes
\[ \left[ \sum_i \left(x_i - \mu\right) \left(x_{i-1} - \mu \right) \right] \left[ \sum_i \left(x_i - \mu\right)^2 \right]^{-1} \]This function produces the same results as
gsl_stats_lag1_autocorrelation_m()
.If
n
is less than 2, this function will call the error handler.
-
template<class vec_t>
double o2scl::vector_lag1_autocorr(const vec_t &data, double mean)¶ Lag-1 autocorrelation.
This function computes
\[ \left[ \sum_i \left(x_i - \mu\right) \left(x_{i-1} - \mu \right) \right] \left[ \sum_i \left(x_i - \mu\right)^2 \right]^{-1} \]This function produces the same results as
gsl_stats_lag1_autocorrelation_m()
.If
n
is less than 2, this function will call the error handler.
-
template<class vec_t>
double o2scl::vector_lag1_autocorr(size_t n, const vec_t &data)¶ Lag-1 autocorrelation.
This function computes
\[ \left[ \sum_i \left(x_i - \mu\right) \left(x_{i-1} - \mu \right) \right] \left[ \sum_i \left(x_i - \mu\right)^2 \right]^{-1} \]This function produces the same results as
gsl_stats_lag1_autocorrelation()
.If
n
is less than 2, this function will call the error handler.
-
template<class vec_t>
double o2scl::vector_lag1_autocorr(const vec_t &data)¶ Lag-1 autocorrelation.
This function computes
\[ \left[ \sum_i \left(x_i - \mu\right) \left(x_{i-1} - \mu \right) \right] \left[ \sum_i \left(x_i - \mu\right)^2 \right]^{-1} \]This function produces the same results as
gsl_stats_lag1_autocorrelation()
.If
n
is less than 2, this function will call the error handler.