zmath.matrix
Defines a squared Matrix with column-major ordering from 2x2 to 4x4 size
-
Declaration
aliasMat2f= Matrix!(float, 2LU).Matrix;2D squared matrix of floats
-
Declaration
aliasMat3f= Matrix!(float, 3LU).Matrix;3D squared matrix of floats
-
Declaration
aliasMat4f= Matrix!(float, 4LU).Matrix;4D squared matrix of floats
-
Declaration
aliasMat2d= Matrix!(double, 2LU).Matrix;2D squared matrix of doubles
-
Declaration
aliasMat3d= Matrix!(double, 3LU).Matrix;3D squared matrix of doubles
-
Declaration
aliasMat4d= Matrix!(double, 4LU).Matrix;4D squared matrix of doubles
-
Declaration
aliasMat2r= Matrix!(real, 2LU).Matrix;2D squared matrix of reals
-
Declaration
aliasMat3r= Matrix!(real, 3LU).Matrix;3D squared matrix of reals
-
Declaration
aliasMat4r= Matrix!(real, 4LU).Matrix;4D squared matrix of reals
-
Declaration
structMatrix(T, size_t dim_) if (__traits(isFloating, T) && (dim_ >= 2) && (dim_ <= 4));Defines a squared
Matrixof n = 2, 3 or 4 size, like a linear array of numbers in a row-major order-
Declaration
static enum size_tdim;Matrix Dimension
-
Declaration
static enum size_tcells;Matrix number of
cells -
Declaration
static enum Matrix!(T, 2)ZERO;Zero R2 matrix
-
Declaration
static enum Matrix!(T, 2)IDENTITY;Identity R2 matrix
-
Declaration
const pure @nogc TopIndex(size_trow, size_tcol);Returns i, j cell
-
Declaration
@nogc voidopIndexAssign(K)(Kval, size_trow, size_tcol) if (is(K : real));Assigns a new cell value
-
Declaration
const pure @nogc VRowopIndex(size_ti);Returns
irow vector -
Declaration
@nogc voidopIndexAssign(K)(Kv, size_ti) if (isVector!K);Assigns a new row vector
-
Declaration
const pure @nogc boolopEquals()(auto ref const Matrixrhs);Define Equality
-
Declaration
const pure @nogc boolapproxEqual()(auto ref const Matrixrhs, TmaxRelDiff= 0.01, TmaxAbsDiff= 1e-05);Approximated equality
-
Declaration
const pure @nogc MatrixopUnary(string op)() if (op == "+" || op == "-");Define unary operators + and -
-
Declaration
const pure @nogc MatrixopBinary(string op)(auto ref const Matrixrhs) if ((op == "+" || op == "-") && (dim >= 2) && (dim <= 4));Define binary operator + and -
-
Declaration
const pure @nogc MatrixopBinary(string op)(in realrhs) if (op == "*" || op == "/");Define Scalar multiplication
-
Declaration
const pure @nogc MatrixopBinaryRight(string op)(in realrhs) if (op == "*" || op == "/");Define Scalar multiplication
-
Declaration
const pure @nogc MatrixopBinary(string op)(auto ref const Matrixrhs) if (op == "*");Define Matrix Product
-
Declaration
const pure @nogc VColopBinary(string op)(auto ref const VRowrhs) if (op == "*");Define Matrix x Vector
-
Declaration
const pure @nogc VColopBinaryRight(string op)(auto ref const VCollhs) if (op == "*");Define Vector x Matrix
-
Declaration
const pure @nogc Matrixtranspose();Returns transposed matrix
Discussion
It can be used to "convert" Matrix to a row ordered matrix
-
Declaration
const pure @nogc Tdeterminant();Returns Determinant of this matrix
-
Declaration
const pure @nogc Matrixinverse();Calcs this matrix
inverseReturn Value
A matrix full of NaNs if this matrix isn't inverible (!isOk =1)
-
Declaration
const pure @nogc boolisOk();Checks that the matrix not have a weird NaN value
-
Declaration
const pure @nogc boolisFinite();Checks that the matrix have finite values
-
Declaration
pure nothrow @nogc @property T*ptr();Return a pointer of the internal array
-
Declaration
const pure @nogc ToutopCast(Tout)() if (isMatrix!Tout && (Tout.dim >= dim));Casting operation that allow convert between Matrix types
-
Declaration
const stringtoString();Returns a visual representation of this matrix
-
-
Declaration
immutable boolisMatrix(T);Say if a thing it's a Matrix