Matrix

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

  1. struct Matrix(Number)
  2. struct Matrix(Number, size_t _rowCount, size_t _columnCount)
  3. struct Matrix(Number, size_t _rowCount, size_t _columnCount)
  4. template Matrix(Number, size_t rowCount, size_t columnCount)

Constructors

this
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(const(Matrix!(OtherNumber, otherRowCount, otherColumnCount)) other)

Multiply two matrices.

opBinary
Matrix!(OtherNumber, rowCount, otherColumnCount) opBinary(const(Matrix!(OtherNumber, otherRowCount, otherColumnCount)) other)
Undocumented in source. Be warned that the author may not have intended to support it.
opBinary
Matrix!(OtherNumber, rowCount, otherColumnCount) opBinary(const(Matrix!(OtherNumber, otherRowCount, otherColumnCount)) other)
Undocumented in source. Be warned that the author may not have intended to support it.
opIndex
inout(Number[columnCount]) opIndex(size_t row)
opIndex
inout(Number) opIndex(size_t row, size_t column)
opOpAssign
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