Matrix

Defines a squared Matrix of n = 2, 3 or 4 size, like a linear array of numbers in a row-major order

Members

Functions

approxEqual
bool approxEqual(Matrix rhs, T maxRelDiff, T maxAbsDiff)

Approximated equality

determinant
T determinant()

Returns Determinant of this matrix

inverse
Matrix inverse()

Calcs this matrix inverse

isFinite
bool isFinite()

Checks that the matrix have finite values

isOk
bool isOk()

Checks that the matrix not have a weird NaN value

opBinary
Matrix opBinary(Matrix rhs)

Define binary operator + and -

opBinary
Matrix opBinary(real rhs)

Define Scalar multiplication

opBinary
Matrix opBinary(Matrix rhs)

Define Matrix Product

opBinary
VCol opBinary(VRow rhs)

Define Matrix x Vector

opBinaryRight
Matrix opBinaryRight(real rhs)

Define Scalar multiplication

opBinaryRight
VCol opBinaryRight(VCol lhs)

Define Vector x Matrix

opCast
Tout opCast()

Casting operation that allow convert between Matrix types

opEquals
bool opEquals(Matrix rhs)

Define Equality

opIndex
T opIndex(size_t row, size_t col)

Returns i, j cell

opIndex
VRow opIndex(size_t i)

Returns i row vector

opIndexAssign
void opIndexAssign(K val, size_t row, size_t col)

Assigns a new cell value

opIndexAssign
void opIndexAssign(K v, size_t i)

Assigns a new row vector

opUnary
Matrix opUnary()

Define unary operators + and -

toString
string toString()

Returns a visual representation of this matrix

transpose
Matrix transpose()

Returns transposed matrix

Properties

ptr
T* ptr [@property getter]

Return a pointer of the internal array

Static variables

IDENTITY
enum Matrix!(T, 2) IDENTITY;

Identity R2 matrix

IDENTITY
enum Matrix!(T, 3) IDENTITY;

Identity R3 matrix

IDENTITY
enum Matrix!(T, 4) IDENTITY;

Identity R4 matrix

ZERO
enum Matrix!(T, 2) ZERO;

Zero R2 matrix

ZERO
enum Matrix!(T, 3) ZERO;

Zero R3 matrix

ZERO
enum Matrix!(T, 4) ZERO;

Zero R4 matrix

cells
enum size_t cells;

Matrix number of cells

dim
enum size_t dim;

Matrix Dimension

Unions

__anonymous
union __anonymous
Undocumented in source.

Meta