1 #ifndef STAN__MATH__ERROR_HANDLING__MATRIX__CHECK_LOWER_TRIANGULAR_HPP
2 #define STAN__MATH__ERROR_HANDLING__MATRIX__CHECK_LOWER_TRIANGULAR_HPP
26 template <
typename T_y,
typename T_result>
28 const Eigen::Matrix<T_y,Eigen::Dynamic,Eigen::Dynamic>& y,
31 for (
int n = 1; n < y.cols(); ++n) {
32 for (
int m = 0; m < n && m < y.rows(); ++m) {
34 std::stringstream msg;
35 msg << name <<
" is not lower triangular;"
39 std::string msg_string(msg.str());
40 return dom_err(
function,y(m,n),
"",msg_string.c_str(),
"",result);
bool dom_err(const char *function, const T &y, const char *name, const char *error_msg, const T_msg error_msg2, 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.