power function

Matrix power(
  1. Matrix matrix,
  2. int x
)

scalar power of a matrix

  • matrix The matrix to perform the operation on
  • x The power to raise the matrix to
  • Returns The new matrix

Implementation

Matrix power(Matrix matrix, int x) {
  return matrix.performFunction((a) => pow(a, x));
}