1#ifndef STAN_MATH_PRIM_ERR_CHECK_CHOLESKY_FACTOR_CORR_HPP
2#define STAN_MATH_PRIM_ERR_CHECK_CHOLESKY_FACTOR_CORR_HPP
36template <
typename Mat, require_matrix_t<Mat>* =
nullptr>
43 for (Eigen::Index i = 0; i < y_ref.rows(); ++i) {
68template <
typename StdVec, require_std_vector_t<StdVec>* =
nullptr>
71 for (
size_t i = 0; i < y.size(); ++i) {
auto make_iter_name(const char *name)
double value_of_rec(const fvar< T > &v)
Return the value of the specified variable.
void check_square(const char *function, const char *name, const T_y &y)
Check if the specified matrix is square.
void check_unit_vector(const char *function, const char *name, const Vec &theta)
Throw an exception if the specified vector does not have unit Euclidiean length.
void check_cholesky_factor_corr(const char *function, const char *name, const Mat &y)
Throw an exception if the specified matrix is not a valid Cholesky factor of a correlation matrix.
ref_type_t< T && > to_ref(T &&a)
This evaluates expensive Eigen expressions.
void check_positive(const char *function, const char *name, const T_y &y)
Check if y is positive.
void check_lower_triangular(const char *function, const char *name, const T_y &y)
Check if the specified matrix is lower triangular.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...