mixin math::Matrix
math::Matrix
Interface for matrix implementations. A matrix is a rectangular array of numbers.
- cofactor
-
abstract Matrix cofactor()Compute the cofactor of the matrix. The matrix must be square.
- determinant
-
abstract Float determinant()Compute the determinant of the matrix. The matrix must be square.
- fill
-
Set every element in the matrix to the given val.
- get
-
abstract Float get(Int i, Int j)Get the element at
A[i,j], whereiis the row index, andjis column index. - inverse
-
abstract Matrix inverse()Compute the inverse of the matrix.
- isSquare
-
abstract Bool isSquare()Return true if the matrix is square.
- minus
-
@Operator
abstract Matrix minus(Matrix b)Computes
A - Band returns a new matrix. - mult
-
@Operator
abstract Matrix mult(Matrix b)Computes
A * Band returns a new matrix. - multScalar
-
abstract This multScalar(Float x)Computes
x * A. - numCols
-
abstract Int numCols()The number of columns in the matrix.
- numRows
-
abstract Int numRows()The number of rows in the matrix.
- plus
-
@Operator
abstract Matrix plus(Matrix b)Computes
A + Band returns a new matrix. - set
-
abstract This set(Int i, Int j, Float val)Set the element at
A[i,j], whereiis the row index, andjis column index. - transpose
-
abstract Matrix transpose()Get the transpose of the matrix.