Stan Math Library
5.0.0
Automatic Differentiation
Loading...
Searching...
No Matches
◆
identity_matrix()
template<typename T_x ,
require_matrix_cl_t
< T_x > * = nullptr>
auto stan::math::identity_matrix
(
int
K
)
inline
Return a square identity matrix.
Parameters
K
size of the matrix
Returns
An identity matrix of size K.
Exceptions
std::domain_error
if K is negative.
Definition at line
19
of file
identity_matrix.hpp
.
stan
math
[
Stan Home Page
]
© 2011–2019, Stan Development Team.