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