You are here: Symbol Reference > Sparse Namespace > Classes > TSparseMtx Class > public > Add Method > TSparseMtx.Add Method (TSparseMtx, TSparseMtx, integer)
MtxVec VCL
ContentsIndex
PreviousUpNext
TSparseMtx.Add Method (TSparseMtx, TSparseMtx, integer)

Sums two sparse matrices (A+B).

Pascal
procedure Add(const A: TSparseMtx; const B: TSparseMtx; MaxNonZeroCount: integer = 10000000); overload;

Sum sparse matrices A and B and place the result in the calling sparse matrix. Because the resulting matrix can be much less sparse, the memory requirements can increase beyond the available system memory. An exception will be raised if if the requested memory size will exceed the value of MaxNonZeroCount.

Copyright (c) 1999-2025 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!