TMtxSmallInt.Equal Method

Boolean Equal(TMtxInt Mtx)

Compares two matrices.

#NameTypeDescription
1MtxTMtxIntsource TMtxInt

Returns: Boolean

Remarks:

Compares Mtx with the calling matrix and returns true if the matrices are equal (if all elements match in position and value). Tolerance defines the comparison tolerance. The maximum difference between elements may not exceed: +/-Tolerance. If Tolerance is omitted, a direct comparison algorithm is used.

Examples
TMtxInt A;
TMtxInt B;
boolean c;
MtxVec.CreateIt(out A, out B);
try
    {
        A.SetIt(2,2,[1,2,
        2,4]);  // 2x2, int matrix
        B.SetIt(2,2,[1,2,
        2,4]);  // 2x2, int matrix
        c = A.Equal(B); // Check for an exact match
    }
finally
    {
        MtxVec.FreeIt(ref A, ref B);
    }