Matrix

A static matrix type. This is a value matrix value type created directly on the stack.

Constructors

this
this(ref const(Number[columnCount][rowCount]) data)
this(const(Number[columnCount][rowCount]) data)

Construct this matrix from a 2 dimensional static array.

this
this(Number[rowCount * columnCount] numbers...)

Construct this matrix directly from a series of numbers. This constructor is designed to be executed at compile time.

Alias This

array2D

Members

Functions

opApply
int opApply(int delegate(ref size_t, ref size_t, ref Number) dg)

Overload for foreach(rowIndex, columnIndex, value; matrix) {}

opBinary
Matrix!(Number, rowCount, columnCount) opBinary(const(Matrix!(OtherNumber, rowCount, columnCount)) other)

Add or subtract two matrices, yielding a new matrix.

opBinary
Matrix!(Number, rowCount, otherColumnCount) opBinary(ref const(Matrix!(OtherNumber, otherRowCount, otherColumnCount)) other)

Multiply two matrices.

opBinary
Matrix!(Number, rowCount, columnCount) opBinary(ref const(Matrix!(OtherNumber, rowCount, columnCount)) other)

Add or subtract two matrices, yielding a new matrix.

opBinary
Matrix!(Number, rowCount, otherColumnCount) opBinary(const(Matrix!(OtherNumber, otherRowCount, otherColumnCount)) other)

Multiply two matrices.

opIndex
inout(Number[columnCount]) opIndex(size_t row)
opIndex
inout(Number) opIndex(size_t row, size_t column)
opOpAssign
void opOpAssign(ref const(Matrix!(OtherNumber, rowCount, columnCount)) other)
void opOpAssign(const(Matrix!(OtherNumber, rowCount, columnCount)) other)

Modify this matrix, adding/subtracting values from another matrix.

Manifest constants

columnCount
enum columnCount;

The number of columns in this matrix.

empty
enum empty;

true if this matrix is a zero-sized matrix.

isSquare
enum isSquare;

true if this matrix is a square matrix.

rowCount
enum rowCount;

The number of rows in this matrix.

Properties

array1D
inout(Number[rowCount * columnCount]) array1D [@property getter]

Variables

array2D
Number[columnCount][rowCount] array2D;

The data backing this matrix.

Meta