mixin math::Matrix

math::Matrix

Source

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

cofactor

abstract Matrix cofactor()

Source

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

determinant

abstract Float determinant()

Source

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

fill

abstract This fill(Float val)

Source

Set every element in the matrix to the given val.

get

abstract Float get(Int i, Int j)

Source

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

inverse

abstract Matrix inverse()

Source

Compute the inverse of the matrix.

isSquare

abstract Bool isSquare()

Source

Return true if the matrix is square.

minus

@Operator
abstract Matrix minus(Matrix b)

Source

Computes A - B and returns a new matrix.

mult

@Operator
abstract Matrix mult(Matrix b)

Source

Computes A * B and returns a new matrix.

multScalar

abstract This multScalar(Float x)

Source

Computes x * A.

numCols

abstract Int numCols()

Source

The number of columns in the matrix.

numRows

abstract Int numRows()

Source

The number of rows in the matrix.

plus

@Operator
abstract Matrix plus(Matrix b)

Source

Computes A + B and returns a new matrix.

set

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

Source

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

transpose

abstract Matrix transpose()

Source

Get the transpose of the matrix.