1 #ifndef STAN__AGRAD__REV__ERROR_HANDLING__MATRIX__CHECK_POS_DEFINITE_HPP
2 #define STAN__AGRAD__REV__ERROR_HANDLING__MATRIX__CHECK_POS_DEFINITE_HPP
14 template <
typename T_result,
class Policy>
16 const Eigen::Matrix<var,Eigen::Dynamic,Eigen::Dynamic>& y,
23 typedef typename index_type<Matrix<double,Dynamic,Dynamic> >::type
size_type;
24 Matrix<double,Dynamic,Dynamic> y_d(y.rows(),y.cols());
25 for (size_type i = 0; i < y_d.rows(); i++)
26 for (size_type j = 0; j < y_d.cols(); j++)
27 y_d(i,j) = y(i,j).val();
Primary template class for the metaprogram to compute the index type of a container.
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic >::Index size_type
bool check_pos_definite(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 positive definite.
bool check_pos_definite(const char *function, const Eigen::Matrix< var, Eigen::Dynamic, Eigen::Dynamic > &y, const char *name, T_result *result, const Policy &)