SparseMatrix<T>.ComponentwiseMultiply Method

Definition

Namespace: Extreme.Mathematics.LinearAlgebra
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23

Overload List

ComponentwiseMultiply(Matrix<T>) Multiplies the elements of this instance by the corresponding elements of another matrix.
Obsolete.
ComponentwiseMultiply(Matrix<T>, SparseMatrix<T>) Multiplies the components of a matrix by the corresponding components of a sparse matrix.
ComponentwiseMultiply(SparseMatrix<T>, Matrix<T>) 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.
C#
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

ArgumentNullExceptionmatrix is null

-or-

sparseMatrix is null

DimensionMismatchException 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.
C#
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

ArgumentNullExceptionmatrix is null

-or-

sparseMatrix is null

DimensionMismatchException 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.

See Also