Matrix

Main matrix interface.

Constructors

this
this(Type[Cols * Lines] values)

Matrix default constructor. It receives a bunch of values in amount of product of matrix lines and columns.

Members

Aliases

cols
alias cols = Cols

Gets quantity of matrix columns.

lines
alias lines = Lines

Gets quantity of matrix lines.

type
alias type = Type

Gets type of matrix data

Functions

castTo
Matrix!(Lines, Cols, NewType) castTo()

Casts matrix to a new type. It should be matrix type too, with equal quantity of lines and cols.

opApply
int opApply(int delegate(ref Type) foreach_)

Iterates matrix without returning any element number.

opApply
int opApply(int delegate(ref size_t, ref Type) foreach_)

Iterates matrix by element number. E.g. returned number of m[1][2] element in Matrix3x3 iteration will be 5.

opApply
int opApply(int delegate(ref size_t, ref size_t, ref Type) foreach_)

Iterates matrix returning line and column number with element.

opBinary
Self opBinary(Matrix!(Lines, Cols, SumType) summand)

Processes matrix addition and subtraction.

opBinary
Self opBinary(Number num)

Processes matrix multiplication and division with number.

opBinary
auto opBinary(Factor factor)

Processes matrix multiplication with another matrix.

opBinaryRight
Self opBinaryRight(Number num)

Processes matrix multiplication and division with number.

opCast
NewType opCast()

Casts matrix to a new type. It should be matrix type too, with equal quantity of lines and cols.

opCast
string opCast()

Casts matrix to a string.

opIndex
auto ref opIndex(size_t line)

Gets matrix line.

opOpAssign
void opOpAssign(Matrix!(Lines, Cols, SumType) summand)

Processes matrix addition and subtraction.

opOpAssign
void opOpAssign(Number num)

Processes matrix multiplication and division with number.

opOpAssign
void opOpAssign(Factor factor)

Processes matrix multiplication with another matrix.

opUnary
auto opUnary()

Inverses matrix sign

set
void set(Type[Cols * Lines] values)

Sets all matrix values in one action. It receives bunch of values.

toString
string toString()

Stringifies matrix data.

Properties

identity
Self identity [@property getter]

Returns indentity matrix instead of zero.

t
auto t [@property getter]

Transposes matrix.

Static functions

diag
Self diag(Type[Lines] values)

Makes matrix with diagonal consists of received values.

Meta