type

Matrix

src mixin Matrix

Interface for matrix implementations. A matrix is a rectangular array of numbers.

methods

cofactor

Compute the cofactor of the matrix.

determinant

Compute the determinant of the matrix.

fill

Set every element in the matrix to the given val.

get

Get the element at A[i,j], where i is the row index, and j is column index.

inverse

Compute the inverse of the matrix.

isSquare

Return true if the matrix is square.

minus

Computes A - B and returns a new matrix.

mult

Computes A * B and returns a new matrix.

multScalar

Computes x * A.

numCols

The number of columns in the matrix.

numRows

The number of rows in the matrix.

plus

Computes A + B and returns a new matrix.

set

Set the element at A[i,j], where i is the row index, and j is column index.

transpose

Get the transpose of the matrix.

Slot Details

cofactor

src abstract Matrix cofactor()

Compute the cofactor of the matrix. The matrix must be square.

determinant

src abstract Float determinant()

Compute the determinant of the matrix. The matrix must be square.

fill

src abstract This fill(Float val)

Set every element in the matrix to the given val.

get

src abstract Float get(Int i, Int j)

Get the element at A[i,j], where i is the row index, and j is column index.

inverse

src abstract Matrix inverse()

Compute the inverse of the matrix.

isSquare

src abstract Bool isSquare()

Return true if the matrix is square.

minus

src @Operator
abstract Matrix minus(Matrix b)

Computes A - B and returns a new matrix.

mult

src @Operator
abstract Matrix mult(Matrix b)

Computes A * B and returns a new matrix.

multScalar

src abstract This multScalar(Float x)

Computes x * A.

numCols

src abstract Int numCols()

The number of columns in the matrix.

numRows

src abstract Int numRows()

The number of rows in the matrix.

plus

src @Operator
abstract Matrix plus(Matrix b)

Computes A + B and returns a new matrix.

set

src abstract This set(Int i, Int j, Float val)

Set the element at A[i,j], where i is the row index, and j is column index.

transpose

src abstract Matrix transpose()

Get the transpose of the matrix.