MatMN

nape.geom.MatMN (final class)

A general MxN dimensional matrix.

This object is not often used in Nape :)

Instance Members

@private


nape
rows: Int

The number of rows in the matrix.


nape
cols: Int

The number of columns in the matrix.


nape
x(row: Int, col: Int): Float

Access element at index.

Name Type Description
row Int The row of the matrix to access.
col Int the column of the matrix to access.
Returns Description
Float The element at given (row,col) index.

nape
setx(row: Int, col: Int, x: Float): Float

Set element at index.

Name Type Description
row Int The row of the matrix to set.
col Int The column of the matrix to set.
x Float The value to set at given (row,col) index.
Returns Description
Float The value of matrix at given index after set. (Always equal to the x parameter)

nape
toString(): String

@private

Returns
String

nape
transpose(): MatMN

Transpose matrix, returning a new Matrix.

Returns Description
MatMN The transposed matrix.

nape
mul(matrix: MatMN): MatMN

Multiple this matrix with another.

This operation is only valid if the number of columns in this matrix, is equal to the number of rows in the input matrix.
The result of the multiplication is returned as a new matrix.

Name Type Description
matrix MatMN The matrix to multiple with.
Returns Description
MatMN The result of the multiplication

nape
new(rows: Int, cols: Int): Void

Construct a new Matrix.

Name Type Description
rows Int The number of rows in matrix.
cols Int The number of columns in matrix.

Private Members

Metadata

Name Parameters
:final -