Overload List
| # | Signature | Description |
|---|---|---|
| 1 | function MulElem(const Mtx: TMtx): TMtx; overload; | Matrix element-wise multiplication. |
| 2 | function MulElem(const Mtx1, Mtx2: TMtx): TMtx; overload; | Multiplies elements in Mtx1 matrix with the elements in Mtx2 matrix (array multiplication) and stores the results in calling matrix. |
| 3 | function MulElem(const X,Y: TMtxVec; const Z: Double): TMtx; overload; | self = X*Y*zScalar |
| 4 | function MulElem(const X,Y: TMtxVec; const Z: TCplx): TMtx; overload; | self = X*Y*zScalar |
| 5 | function MulElem(const X, Y,Z: TMtxVec): TMtx; overload; | self = X*Y*Z |
Overload 1: function MulElem(const Mtx: TMtx): TMtx; overload;
Matrix element-wise multiplication.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Mtx | TMtx | source TMtx |
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 TMtx.Rows, TMtx.Cols and TMtxVec.Complex properties of both matrices must match, otherwise an exception is raised.
var A,B,C: TMtx;
begin
CreateIt(A,B,C);
try
A.SetIt(2,2,False,[1,2,
2,4]);
B.SetIt(2,2,False,[1,2,
2,4]);
C.MulElem(A,B);
// C becomes:
// [1, 4,
// 4,16]
finally
FreeIt(A,B,C);
end;
end;
Overload 2: function MulElem(const Mtx1, Mtx2: TMtx): TMtx; overload;
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
Overload 3: function MulElem(const X,Y: TMtxVec; const Z: Double): TMtx; overload;
Compute X*Y*zScalar
Result: stored in self (calling object), returns self for chaining
The following expression would also run at the same or higher speed, when passing X also for the Z parameter:
X^2*zScalar
Overload 4: function MulElem(const X,Y: TMtxVec; const Z: TCplx): TMtx; overload;
Compute X*Y*zScalar
Result: stored in self (calling object), returns self for chaining
The following expression would also run at the same or higher speed, when passing X also for the Z parameter:
X^2*zScalar
Overload 5: function MulElem(const X, Y,Z: TMtxVec): TMtx; overload;
Compute X*Y*Z
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TMtxVec | source TVec or TMtx |
| 2 | Y | TMtxVec | source TVec or TMtx |
| 3 | Z | TMtxVec | source TVec or TMtx |
Result: stored in self (calling object), returns self for chaining
The following expression would also run at the same or higher speed, when passing X also for the Z parameter:
X^2*Y