TSparseMtx.Equal Method

Overload List

#SignatureDescription
1function Equal(const B: TMtx; Tolerance: Double; NonZerosOnly: Boolean): Boolean;Compares two sparse matrices.
2function Equal(const B: TSparseMtx; Tolerance: Double): Boolean;Compares two sparse matrices.

Overload 1: function Equal(const B: TMtx; Tolerance: Double; NonZerosOnly: Boolean): Boolean;

Compares two sparse matrices.

#NameTypeDescription
1BTMtx
2ToleranceDoublescalar
3NonZerosOnlyBoolean

Returns: Boolean - true, if the calling matrix is equal to dense B matrix (if all elements match in position and value).

Remarks:

Tolerance defines the comparison tolerance. The maximum difference between elements may not exceed: +/-Tolerance. If Tolerance is omitted, a direct comparison algorithm is used. If NonZerosOnly is True then only the non-zero values of the calling sparse matrix are compared with corresponding values in the dense matrix.

See Also: TSparseMtx.IsEqualSize

Overload 2: function Equal(const B: TSparseMtx; Tolerance: Double): Boolean;

Compares two sparse matrices.

#NameDescription
1BCompare B with calling sparse matrix.
2ToleranceDefines the comparison tolerance. The maximum difference between elements may not exceed: +/-Tolerance. If Tolerance is omitted, a direct comparison algorithm is used.

Returns: Boolean - true, if the calling matrix is equal to sparse B matrix (if all elements match in position and value).