1#ifndef STAN_MATH_PRIM_FUN_EIGENDECOMPOSE_SYM_HPP
2#define STAN_MATH_PRIM_FUN_EIGENDECOMPOSE_SYM_HPP
21template <
typename EigMat, require_eigen_t<EigMat>* =
nullptr,
22 require_not_st_var<EigMat>* =
nullptr>
23std::tuple<Eigen::Matrix<value_type_t<EigMat>, -1, -1>,
24 Eigen::Matrix<value_type_t<EigMat>, -1, 1>>
31 const PlainMat& m_eval = m;
34 Eigen::SelfAdjointEigenSolver<PlainMat> solver(m_eval);
35 return std::make_tuple(std::move(solver.eigenvectors()),
36 std::move(solver.eigenvalues()));
void check_symmetric(const char *function, const char *name, const matrix_cl< T > &y)
Check if the matrix_cl is symmetric.
typename value_type< T >::type value_type_t
Helper function for accessing underlying type.
std::tuple< Eigen::Matrix< value_type_t< EigMat >, -1, -1 >, Eigen::Matrix< value_type_t< EigMat >, -1, 1 > > eigendecompose_sym(const EigMat &m)
Return the eigendecomposition of the specified symmetric matrix.
typename plain_type< T >::type plain_type_t
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...