Overload List
| # | Signature | Description |
|---|---|---|
| 1 | TMtxInt MulElem(TMtxInt Mtx) | Matrix array multiplication. |
| 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. |
Overload 1: TMtxInt MulElem(TMtxInt Mtx)
Matrix array multiplication.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Mtx | TMtxInt | source TMtxInt |
Result: stored in self (calling object), returns self for chaining
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.
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.
Result: stored in self (calling object), returns self for chaining
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.