1 #ifndef STAN__MATH__ERROR_HANDLING__MATRIX__CHECK_CHOLESKY_FACTOR_CORR_HPP
2 #define STAN__MATH__ERROR_HANDLING__MATRIX__CHECK_CHOLESKY_FACTOR_CORR_HPP
33 template <
typename T_y,
typename T_result>
35 const Eigen::Matrix<T_y,Eigen::Dynamic,Eigen::Dynamic>& y,
42 for (
int i = 0; i < y.rows(); ++i)
45 for (
int i = 0; i < y.rows(); ++i) {
46 Eigen::Matrix<T_y,Eigen::Dynamic,1> y_i = y.row(i).transpose();
55 const Eigen::Matrix<T,Eigen::Dynamic,Eigen::Dynamic>& y,
58 return check_cholesky_factor_corr<T,T>(
function,y,name,result);
74 template <
typename T_y,
typename T_result>
76 const Eigen::Matrix<T_y,Eigen::Dynamic,Eigen::Dynamic>& y,
84 const Eigen::Matrix<T,Eigen::Dynamic,Eigen::Dynamic>& y,
86 return check_cholesky_factor_corr<T,T>(
function,y,result);
bool check_unit_vector(const char *function, const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &theta, const char *name, T_result *result)
Return true if the specified vector is unit vector.
bool check_positive(const char *function, const T_y &y, const char *name, T_result *result)
bool check_lower_triangular(const char *function, const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const char *name, T_result *result)
Return true if the specified matrix is lower triangular.
bool check_square(const char *function, const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const char *name, T_result *result)
Return true if the specified matrix is square.
bool check_cholesky_factor_corr(const char *function, const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const char *name, T_result *result)
Return true if the specified matrix is a valid Cholesky factor.