Stan Math Library
2.12.0
reverse mode automatic differentiation
Main Page
Modules
Namespaces
Classes
Files
File List
File Members
stan
math
prim
mat
fun
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
4
#include <
stan/math/prim/mat/fun/Eigen.hpp
>
5
#include <
stan/math/prim/mat/err/check_square.hpp
>
6
7
namespace
stan
{
8
namespace
math {
9
15
template
<
typename
T,
int
R,
int
C>
16
inline
17
Eigen::Matrix<T, R, C>
18
inverse
(
const
Eigen::Matrix<T, R, C>& m) {
19
check_square
(
"inverse"
,
"m"
, m);
20
return
m.inverse();
21
}
22
23
}
24
}
25
#endif
stan
Definition:
log_sum_exp.hpp:8
stan::math::inverse
Eigen::Matrix< fvar< T >, R, C > inverse(const Eigen::Matrix< fvar< T >, R, C > &m)
Definition:
inverse.hpp:20
Eigen.hpp
stan::math::check_square
bool check_square(const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y)
Return true if the specified matrix is square.
Definition:
check_square.hpp:28
check_square.hpp
[
Stan Home Page
]
© 2011–2016, Stan Development Team.