Stan
2.5.0
probability, sampling & optimization
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
src
stan
math
matrix
determinant.hpp
Go to the documentation of this file.
1
#ifndef STAN__MATH__MATRIX__DETERMINANT_HPP
2
#define STAN__MATH__MATRIX__DETERMINANT_HPP
3
4
#include <
stan/math/matrix/Eigen.hpp
>
5
#include <
stan/math/error_handling/matrix/check_square.hpp
>
6
7
namespace
stan {
8
namespace
math {
9
17
template
<
typename
T,
int
R,
int
C>
18
inline
T
determinant
(
const
Eigen::Matrix<T,R,C>& m) {
19
stan::math::check_square
(
"determinant(%1%)"
,m,
"m"
,(
double
*)0);
20
return
m.determinant();
21
}
22
23
}
24
}
25
#endif
Eigen.hpp
stan::math::determinant
T determinant(const Eigen::Matrix< T, R, C > &m)
Returns the determinant of the specified square matrix.
Definition:
determinant.hpp:18
stan::math::check_square
bool check_square(const char *function, const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const char *name, T_result *result)
Return true if the specified matrix is square.
Definition:
check_square.hpp:24
check_square.hpp
[
Stan Home Page
]
© 2011–2014, Stan Development Team.