1#ifndef STAN_MATH_PRIM_FUN_WELFORD_COVAR_ESTIMATOR_HPP
2#define STAN_MATH_PRIM_FUN_WELFORD_COVAR_ESTIMATOR_HPP
26 Eigen::VectorXd delta(q -
m_);
28 m2_ += (q -
m_) * delta.transpose();
void add_sample(const Eigen::VectorXd &q)
void sample_covariance(Eigen::MatrixXd &covar)
welford_covar_estimator(int n)
void sample_mean(Eigen::VectorXd &mean)
(Expert) Numerical traits for algorithmic differentiation variables.
scalar_type_t< T > mean(const T &m)
Returns the sample mean (i.e., average) of the coefficients in the specified std vector,...
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...