1#ifndef STAN_MATH_PRIM_FUN_EIGENVECTORS_HPP
2#define STAN_MATH_PRIM_FUN_EIGENVECTORS_HPP
19template <
typename EigMat, require_eigen_matrix_dynamic_t<EigMat>* =
nullptr,
20 require_not_vt_complex<EigMat>* =
nullptr>
21inline Eigen::Matrix<complex_return_t<value_type_t<EigMat>>, -1, -1>
24 return Eigen::Matrix<complex_return_t<value_type_t<EigMat>>, -1, -1>(0, 0);
28 const PlainMat& m_eval = m;
30 Eigen::EigenSolver<PlainMat> solver(m_eval);
31 return solver.eigenvectors();
43template <
typename EigCplxMat,
45inline Eigen::Matrix<complex_return_t<value_type_t<EigCplxMat>>, -1, -1>
48 return Eigen::Matrix<complex_return_t<value_type_t<EigCplxMat>>, -1, -1>(0,
52 using PlainMat = Eigen::Matrix<scalar_type_t<EigCplxMat>, -1, -1>;
53 const PlainMat& m_eval = m;
55 Eigen::ComplexEigenSolver<PlainMat> solver(m_eval);
56 return solver.eigenvectors();
require_t< container_type_check_base< is_eigen_matrix_dynamic, value_type_t, TypeCheck, Check... > > require_eigen_matrix_dynamic_vt
Require type satisfies is_eigen_matrix_dynamic.
void check_square(const char *function, const char *name, const T_y &y)
Check if the specified matrix is square.
Eigen::Matrix< complex_return_t< value_type_t< EigMat > >, -1, -1 > eigenvectors(const EigMat &m)
Return the eigenvectors of a (real-valued) 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 ...