Automatic Differentiation
 
Loading...
Searching...
No Matches
pseudo_eigenvectors.hpp
Go to the documentation of this file.
1#ifndef STAN_MATH_PRIM_FUN_PSEUDO_EIGENVECTORS_HPP
2#define STAN_MATH_PRIM_FUN_PSEUDO_EIGENVECTORS_HPP
3
6
7namespace stan {
8namespace math {
9
10template <typename T>
11Eigen::Matrix<T, -1, -1> pseudo_eigenvectors(
12 const Eigen::Matrix<T, -1, -1>& m) {
13 check_nonzero_size("pseudo_eigenvectors", "m", m);
14 check_square("pseudo_eigenvectors", "m", m);
15
16 Eigen::EigenSolver<Eigen::Matrix<T, -1, -1>> solver(m);
17 return solver.pseudoEigenvectors();
18}
19
20} // namespace math
21} // namespace stan
22#endif
void check_square(const char *function, const char *name, const T_y &y)
Check if the specified matrix is square.
Eigen::Matrix< T, -1, -1 > pseudo_eigenvectors(const Eigen::Matrix< T, -1, -1 > &m)
void check_nonzero_size(const char *function, const char *name, const T_y &y)
Check if the specified matrix/vector is of non-zero size.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...