Stan Math Library  2.20.0
reverse mode automatic differentiation
inverse.hpp
Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_INVERSE_HPP
2 #define STAN_MATH_PRIM_MAT_FUN_INVERSE_HPP
3 
6 
7 namespace stan {
8 namespace math {
9 
15 template <typename T, int R, int C>
16 inline Eigen::Matrix<T, R, C> inverse(const Eigen::Matrix<T, R, C>& m) {
17  check_square("inverse", "m", m);
18  return m.inverse();
19 }
20 
21 } // namespace math
22 } // namespace stan
23 #endif
void check_square(const char *function, const char *name, const matrix_cl &y)
Check if the matrix_cl is square.
Eigen::Matrix< fvar< T >, R, C > inverse(const Eigen::Matrix< fvar< T >, R, C > &m)
Definition: inverse.hpp:16

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