plus

operator fun Matrix.plus(other: SparseMatrix): Matrix(source)

Extension function to add a Matrix to a SparseMatrix.

Return

A new Matrix that is the sum of the two matrices.

Parameters

other

The SparseMatrix to add.

Throws

If the dimensions of the matrices don't match.


operator fun SparseMatrix.plus(other: Matrix): Matrix(source)

Adds this sparse matrix to another matrix and returns the resulting matrix.

Return

The resulting matrix after addition.

Parameters

other

The matrix to add to this sparse matrix.

Throws

If the dimensions of the matrices don't match.