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
Ksize of the matrix
Returns
An identity matrix of size K.
Exceptions
std::domain_errorif K is negative.

Definition at line 19 of file identity_matrix.hpp.