Stan Math Library  2.15.0
reverse mode automatic differentiation
singular_values.hpp
Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_SINGULAR_VALUES_HPP
2 #define STAN_MATH_PRIM_MAT_FUN_SINGULAR_VALUES_HPP
3 
5 
6 namespace stan {
7  namespace math {
8 
17  template <typename T>
18  Eigen::Matrix<T, Eigen::Dynamic, 1>
19  singular_values(const Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic>& m) {
20  return Eigen::JacobiSVD
21  <Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> >(m).singularValues();
22  }
23 
24  }
25 }
26 #endif
Eigen::Matrix< T, Eigen::Dynamic, 1 > singular_values(const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &m)
Return the vector of the singular values of the specified matrix in decreasing order of magnitude...

     [ Stan Home Page ] © 2011–2016, Stan Development Team.