IMSL C# Numerical Library

SparseMatrix.Add Method 

Performs element-wise addition of two real sparse matrices A, B of type SparseMatrix, C \leftarrow \alpha A + \beta B.

public static SparseMatrix Add(
   double alpha,
   double beta,
   SparseMatrix A,
   SparseMatrix B
);

Parameters

alpha
A double scalar value applied to SparseMatrix A.
beta
A double scalar value applied to SparseMatrix B.
A
A SparseMatrix matrix.
B
A SparseMatrix matrix.

Return Value

A SparseMatrix matrix representing the computed sum.

Exceptions

Exception Type Condition
ArgumentException is thrown when the matrices are not of the same size.

See Also

SparseMatrix Class | Imsl.Math Namespace