StorageEfficientMatrixOperations RΒΆ
matstor.spad line 1 [edit on github]
- R: Ring 
This package provides standard arithmetic operations on matrices. The functions in this package store the results of computations in existing matrices, rather than creating new matrices. This package works only for matrices of type Matrix and uses the internal representation of this type.
- ^: (Matrix R, NonNegativeInteger) -> Matrix R
- x ^ ncomputes the- n-th power of a square matrix. The power- nis assumed greater than 1.
- copy!: (Matrix R, Matrix R) -> Matrix R
- copy!(c, a)copies the matrix- ainto the matrix- c. Error: if- aand- cdo not have the same dimensions.
- leftScalarTimes!: (Matrix R, R, Matrix R) -> Matrix R
- leftScalarTimes!(c, r, a)computes the scalar product- r * aand stores the result in the matrix- c. Error: if- aand- cdo not have the same dimensions.
- minus!: (Matrix R, Matrix R) -> Matrix R
- minus!(c, a)computes- -aand stores the result in the matrix- c. Error: if a and- cdo not have the same dimensions.
- minus!: (Matrix R, Matrix R, Matrix R) -> Matrix R
- !minus!(c, a, b)computes the matrix difference- a - band stores the result in the matrix- c. Error: if- a,- b, and- cdo not have the same dimensions.
- plus!: (Matrix R, Matrix R, Matrix R) -> Matrix R
- plus!(c, a, b)computes the matrix sum- a + band stores the result in the matrix- c. Error: if- a,- b, and- cdo not have the same dimensions.
- power!: (Matrix R, Matrix R, Matrix R, Matrix R, NonNegativeInteger) -> Matrix R
- power!(a, b, c, m, n)computes- m^- nand stores the result in- a. The matrices- band- care used to store intermediate results. Error: if- a,- b,- c, and- mare not square and of the same dimensions.