1 #ifndef STAN_MATH_PRIM_MAT_ERR_CHECK_LDLT_FACTOR_HPP
2 #define STAN_MATH_PRIM_MAT_ERR_CHECK_LDLT_FACTOR_HPP
33 template <
typename T,
int R,
int C>
38 std::ostringstream msg;
39 msg <<
"is not positive definite. "
40 <<
"last conditional variance is ";
41 std::string msg_str(msg.str());
42 const T too_small = A.
vectorD().tail(1)(0);
44 msg_str.c_str(),
".");
bool check_ldlt_factor(const char *function, const char *name, LDLT_factor< T, R, C > &A)
Return true if the argument is a valid LDLT_factor.
Eigen::Matrix< T, Eigen::Dynamic, 1 > vectorD() const
void domain_error(const char *function, const char *name, const T &y, const char *msg1, const char *msg2)
Throw a domain error with a consistently formatted message.
LDLT_factor is a thin wrapper on Eigen::LDLT to allow for reusing factorizations and efficient autodi...