times

operator fun times(other: SparseMatrix): SparseMatrix(source)

Multiplies this sparse matrix with another sparse matrix and returns the resulting sparse matrix.

Return

The resulting sparse matrix after multiplication.

Parameters

other

The sparse matrix to multiply with this sparse matrix.

Throws

If the number of columns in this matrix does not match the number of rows in the other matrix.


operator fun times(scalar: Double): SparseMatrix(source)

Multiplies this sparse matrix by a scalar value.

Return

A new sparse matrix with all elements multiplied by the scalar.

Parameters

scalar

The scalar value to multiply by.