1#ifndef STAN_MATH_PRIM_FUN_EIGENVECTORS_SYM_HPP
2#define STAN_MATH_PRIM_FUN_EIGENVECTORS_SYM_HPP
11template <
typename EigMat, require_eigen_t<EigMat>* =
nullptr,
12 require_not_st_var<EigMat>* =
nullptr>
13inline Eigen::Matrix<value_type_t<EigMat>, Eigen::Dynamic, Eigen::Dynamic>
16 return Eigen::Matrix<value_type_t<EigMat>, -1, -1>(0, 0);
19 decltype(
auto) m_ref =
to_ref(std::forward<EigMat>(m));
22 Eigen::SelfAdjointEigenSolver<PlainMat> solver(
23 std::forward<
decltype(m_ref)>(m_ref));
24 return solver.eigenvectors();
void check_symmetric(const char *function, const char *name, const matrix_cl< T > &y)
Check if the matrix_cl is symmetric.
matrix_cl< double > eigenvectors_sym(const matrix_cl< double > &m)
ref_type_t< T && > to_ref(T &&a)
This evaluates expensive Eigen expressions.
typename plain_type< std::decay_t< T > >::type plain_type_t
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...