Mat

interface Mat<M : Mat<M, V>, V : Vec>

A common interface for square matrix implementations.

Functions

Link copied to clipboard
abstract fun adj(): M

Returns an adjugate of this matrix.

Link copied to clipboard
abstract fun det(): Float

Returns a determinant of this matrix.

Link copied to clipboard
abstract operator fun get(row: Int, col: Int): Float

Returns element of this matrix at a given row and a given column.

Link copied to clipboard
abstract fun inverse(): M

Returns an inverse of this matrix.

Link copied to clipboard
abstract operator fun times(other: M): M

Multiplies this matrix by the other matrix of the same size.

abstract operator fun times(vector: V): V

Multiplies this matrix by a given vector.

abstract operator fun times(number: Float): M

Multiplies this matrix by a given number.

Link copied to clipboard
abstract fun toFloatArray(): FloatArray

Returns an array of elements of this matrix.

Link copied to clipboard
abstract fun transpose(): M

Returns a transpose of this matrix.

Inheritors

Link copied to clipboard