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

Namespace: Imsl.Math
Assembly: ImslCS (in ImslCS.dll) Version: 6.5.0.0

Syntax

C#
public static SparseMatrix Add(
	double alpha,
	double beta,
	SparseMatrix A,
	SparseMatrix B
)
Visual Basic (Declaration)
Public Shared Function Add ( _
	alpha As Double, _
	beta As Double, _
	A As SparseMatrix, _
	B As SparseMatrix _
) As SparseMatrix
Visual C++
public:
static SparseMatrix^ Add(
	double alpha, 
	double beta, 
	SparseMatrix^ A, 
	SparseMatrix^ B
)

Parameters

alpha
Type: System..::.Double
A double scalar value applied to SparseMatrix A.
beta
Type: System..::.Double
A double scalar value applied to SparseMatrix B.
A
Type: Imsl.Math..::.SparseMatrix
A SparseMatrix matrix.
B
Type: Imsl.Math..::.SparseMatrix
A SparseMatrix matrix.

Return Value

A SparseMatrix matrix representing the computed sum.

Exceptions

ExceptionCondition
System..::.ArgumentException is thrown when the matrices are not of the same size.

See Also