TMtxByte.MulElem Method

Overload List

#SignatureDescription
1TMtxInt MulElem(TMtxInt Mtx)Matrix array multiplication.
2TMtxInt MulElem(TMtxInt Mtx1, TMtxInt Mtx2)Multiplies elements in Mtx1 matrix with the elements in Mtx2 matrix (array multiplication) and stores the results in calling matrix.

Overload 1: TMtxInt MulElem(TMtxInt Mtx)

Matrix array multiplication.

#NameTypeDescription
1MtxTMtxIntsource TMtxInt

Result: stored in self (calling object), returns self for chaining

Remarks:

Multiplies elements in Mtx matrix with the elements in the calling matrix (array multiplication) and stores the results in calling matrix. The Dew.Math.TMtxInt.Rows, Dew.Math.TMtxInt.Cols and Dew.Math.TMtxVecInt.IntPrecision properties of both matrices must match, otherwise an exception is raised.

Examples
TMtxInt A;
TMtxInt B;
TMtxInt C;
MtxVec.CreateIt(out A, out B, out C);
try
    {
        A.SetIt(2,2,[1,2,
        2,4]);
        B.SetIt(2,2,[1,2,
        2,4]);
        C.MulElem(A,B);
        // C becomes:
        // [1, 4,
        //  4,16]
    }
finally
    {
        MtxVec.FreeIt(ref A, ref B, ref C);
    }

Overload 2: TMtxInt MulElem(TMtxInt Mtx1, TMtxInt Mtx2)

Multiplies elements in Mtx1 matrix with the elements in Mtx2 matrix (array multiplication) and stores the results in calling matrix.

#NameTypeDescription
1Mtx1TMtxIntsource TMtxInt
2Mtx2TMtxIntsource TMtxInt

Result: stored in self (calling object), returns self for chaining

Remarks:

The Dew.Math.TMtxInt.Rows, Dew.Math.TMtxInt.Cols and Dew.Math.TMtxVecInt.IntPrecision properties of calling matrix are set implicitly to match those of Mtx1 and Mtx2 matrices. Mtx1 and Mtx2 Rows, Cols, and IntPrecision properties must be the same, otherwise an excetion is raised. raised.