Matrix

Base template for all matrix-types.

Constructors

this
this(Args args)

Constructs the matrix: If a single value is passed, the matrix will be cleared with this value (each column in each row will contain this value). If a matrix with more rows and columns is passed, the matrix will be the upper left nxm matrix. If a matrix with less rows and columns is passed, the passed matrix will be stored in the upper left of an identity matrix. It's also allowed to pass vectors and scalars at a time, but the vectors dimension must match the number of columns and align correctly.

this
this(T mat)
Undocumented in source.
this
this(T mat)
Undocumented in source.
this
this(E value)
Undocumented in source.

Alias This

_matrix

Members

Aliases

T
alias T = transpose
Undocumented in source.
id
alias id = identity
Undocumented in source.
mT
alias mT = E
Undocumented in source.

Enums

isCompatibleMatrix
eponymoustemplate isCompatibleMatrix(T)
Undocumented in source.
isCompatibleVector
eponymoustemplate isCompatibleVector(T)
Undocumented in source.

Functions

at
inout(E) at(uint row, uint col)

Matrix row-major in memory.

at
inout(E) at(uint row, uint col)
Undocumented in source. Be warned that the author may not have intended to support it.
clear
void clear(E value)

Sets all values of the matrix to value (each column in each row will contain this value).

makeIdentity
void makeIdentity()

Makes the current matrix an identity matrix.

opCall
inout(E) opCall(uint row, uint col)

Matrix row-major in memory.

opCall
inout(E) opCall(uint row, uint col)
Undocumented in source. Be warned that the author may not have intended to support it.
transpose
void transpose()

Transpose Current Matrix.

Properties

identity
Matrix identity [@property getter]
toLaTeX
string toLaTeX [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
toMathML
string toMathML [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
toPrettyString
string toPrettyString [@property getter]
toString
Sink toString [@property setter]
transposed
Matrix!(E, cols, rows) transposed [@property getter]

Static functions

isCompatibleMatrixImpl
void isCompatibleMatrixImpl(Matrix!(E, r, c) m)
Undocumented in source. Be warned that the author may not have intended to support it.
isCompatibleVectorImpl
void isCompatibleVectorImpl(Vector!(E, d) vec)
Undocumented in source. Be warned that the author may not have intended to support it.

Static variables

cols
uint cols;

Number of columns

rows
uint rows;

Number of rows

Variables

_matrix
E[cols][rows] _matrix;

Matrix row-major in memory.

_matrix
E[rows][cols] _matrix;
Undocumented in source.

Parameters

E

all values get stored as this type

rows_

rows of the matrix

cols_

columns of the matrix

layout

matrix layout

Meta