Function navtk::matrix_power
Defined in File linear_algebra.hpp
Function Documentation
-
Matrix navtk::matrix_power(const Matrix &matrix, long n)
Raise a square matrix to n power (ie dot n times).
- Parameters
matrix – A square matrix (NxN).
n – Power to raise to. If negative the result is equivalent to matrix_power(inv(matrix), -n).
- Returns
Result of squaring. If n = 0 returns identity matrix of same shape as
matrix.