![]() |
Stan Math Library
5.1.0
Automatic Differentiation
|
|
inline |
Returns the nth power of the specific matrix.
M^n = M * M * ... * M.
| R | number of rows, can be Eigen::Dynamic |
| C | number of columns, can be Eigen::Dynamic |
| [in] | M | a square matrix |
| [in] | n | exponent |
| std::domain_error | if the matrix contains NaNs or infinities. |
| std::invalid_argument | if the exponent is negative or the matrix is not square. |
Definition at line 30 of file matrix_power.hpp.