Sparse Matrix<T>.Componentwise Multiply Method
Definition
Namespace: Numerics.NET.LinearAlgebra
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.4
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.4
Overload List
Componentwise | Multiplies the components of a matrix by the corresponding components of a sparse matrix. |
Componentwise | Multiplies the components of a matrix by the corresponding components of a sparse matrix. |
ComponentwiseMultiply(Matrix<T>, SparseMatrix<T>)
Multiplies the components of a matrix by the corresponding
components of a sparse matrix.
public static Matrix<T> ComponentwiseMultiply(
Matrix<T> matrix,
SparseMatrix<T> sparseMatrix
)
Parameters
- matrix Matrix<T>
- A Matrix<T>.
- sparseMatrix SparseMatrix<T>
- A SparseMatrix<T>.
Return Value
Matrix<T>A new SparseMatrix<T> whose elements are equal to the products of the components of matrix and sparseMatrix .
Exceptions
Argument | matrix is null. -or- sparseMatrix is null. |
Dimension | The number of rows of matrix does not equal the number of rows of sparseMatrix. -or- The number of columns of matrix does not equal the number of columns of sparseMatrix. |
ComponentwiseMultiply(SparseMatrix<T>, Matrix<T>)
Multiplies the components of a matrix by the corresponding
components of a sparse matrix.
public static Matrix<T> ComponentwiseMultiply(
SparseMatrix<T> sparseMatrix,
Matrix<T> matrix
)
Parameters
- sparseMatrix SparseMatrix<T>
- A SparseMatrix<T>.
- matrix Matrix<T>
- A Matrix<T>.
Return Value
Matrix<T>A new SparseMatrix<T> whose elements are equal to the products of the components of sparseMatrix and matrix .
Exceptions
Argument | matrix is null. -or- sparseMatrix is null. |
Dimension | The number of rows of matrix does not equal the number of rows of sparseMatrix. -or- The number of columns of matrix does not equal the number of columns of sparseMatrix. |