Overload List
| # | Signature | Description |
|---|---|---|
| 1 | function DivideElemC(const X: TMtx; const Y: TMtxVec; const Z: TCplx): Matrix; | Result = X / (Y*zScale), where X is a Matrix |
| 2 | function DivideElemC(const X: TMtx; const Y: TMtxVec; const Z: Double): Matrix; | Result = X / (Y*zScale), when X is a Matrix |
| 3 | function DivideElemC(const X: TVec; const Y: TMtxVec; const Z: TCplx): Vector; | Result = X / (Y*zScale) |
| 4 | function DivideElemC(const X: TVec; const Y: TMtxVec; const Z: Double): Vector; | Result = X / (Y*zScale) |
Overload 1: function DivideElemC(const X: TMtx; const Y: TMtxVec; const Z: TCplx): Matrix;
Compute X / (Y*zScale), where X is a Matrix
Returns: Matrix
Overload 2: function DivideElemC(const X: TMtx; const Y: TMtxVec; const Z: Double): Matrix;
Compute X / (Y*zScale), when X is a Matrix.
Returns: Matrix
Remarks:
The operation does only per-element math.
Overload 3: function DivideElemC(const X: TVec; const Y: TMtxVec; const Z: TCplx): Vector;
Overload 4: function DivideElemC(const X: TVec; const Y: TMtxVec; const Z: Double): Vector;
Compute X / (Y*zScale)
Returns: Vector
Remarks:
Divides X by (Y multiplied by the scalar zScale) without temporary objects.
Examples
uses MtxVec, MtxExpr, Math387;
var
X, Y, A1, A2, A3: Vector;
zScale: Double;
begin
zScale := 2.0;
X := [10,20,30,40];
Y := [2,4,6,8];
A1 := X / (Y * zScale);
A2 := DivideElemC(X, Y, zScale);
A3.DivideC(X, Y, zScale);
if not A2.IsEqual(A1) then ERaise('Problem');
if not A3.IsEqual(A1) then ERaise('Problem');
end;