Matrix.opBinary

Add or subtract two matrices, yielding a new matrix.

  1. Matrix!(Number, rowCount, columnCount) opBinary(ref const(Matrix!(OtherNumber, rowCount, columnCount)) other)
    struct Matrix(Number, size_t _rowCount, size_t _columnCount)
    @safe pure nothrow
    opBinary
    (
    string op
    OtherNumber
    )
    (
    ref const(Matrix!(OtherNumber, rowCount, columnCount)) other
    )
    if (
    (
    op == "+" ||
    op == "-"
    )
    &&
    is(OtherNumber : Number)
    )
    if (
    isNumeric!Number &&
    _rowCount > 0
    &&
    _columnCount > 0
    )
  2. Matrix!(Number, rowCount, columnCount) opBinary(const(Matrix!(OtherNumber, rowCount, columnCount)) other)
  3. Matrix!(Number, rowCount, otherColumnCount) opBinary(ref const(Matrix!(OtherNumber, otherRowCount, otherColumnCount)) other)
  4. Matrix!(Number, rowCount, otherColumnCount) opBinary(const(Matrix!(OtherNumber, otherRowCount, otherColumnCount)) other)

Parameters

other
Type: const(Matrix!(OtherNumber, rowCount, columnCount))

The other matrix.

Return Value

Type: Matrix!(Number, rowCount, columnCount)

A new matrix.

Meta