Overload List
| # | Signature | Description |
|---|---|---|
| 1 | function DivideElem(const X: TCplx; const Y: TMtx; const Z: TMtxVec): Matrix; | Result = xScalar / (Y*Z), where Y is a Matrix |
| 2 | function DivideElem(const X: TCplx; const Y: TVec; const Z: TMtxVec): Vector; | Result = xScalar / (Y*Z) |
| 3 | function DivideElem(const X: TMtx; const Y: TMtxVec; const Z: TMtxVec): Matrix; | Result = X / (Y*Z), when X is a Matrix |
| 4 | function DivideElem(const X: TVec; const Y: TMtxVec; const Z: TMtxVec): Vector; | Result = X / (Y*Z) |
| 5 | function DivideElem(const X: Double; const Y: TMtx; const Z: TMtxVec): Matrix; | Result = xScalar / (Y*Z), when Y is a Matrix |
| 6 | function DivideElem(const X: Double; const Y: TVec; const Z: TMtxVec): Vector; | Result = xScalar / (Y*Z) |
Overload 1: function DivideElem(const X: TCplx; const Y: TMtx; const Z: TMtxVec): Matrix;
Compute xScalar / (Y*Z), where Y is a Matrix
Returns: Matrix
Overload 2: function DivideElem(const X: TCplx; const Y: TVec; const Z: TMtxVec): Vector;
Overload 3: function DivideElem(const X: TMtx; const Y: TMtxVec; const Z: TMtxVec): Matrix;
Compute X / (Y*Z), when X is a Matrix
Returns: Matrix
Remarks:
The operation does only per-element math.
Examples
uses MtxVec, MtxExpr, Math387;
var
Y, Z, A1, A2, A3: Vector;
xScalar: Double;
begin
xScalar := 100;
Y := [2,4,5,10];
Z := [1,2,2,2];
A1 := xScalar / (Y * Z);
A2 := DivideElem(xScalar, Y, Z);
A3.Divide(xScalar, Y, Z);
if not A2.IsEqual(A1) then ERaise('Problem');
if not A3.IsEqual(A1) then ERaise('Problem');
end;
Overload 4: function DivideElem(const X: TVec; const Y: TMtxVec; const Z: TMtxVec): Vector;
Compute X / (Y*Z)
Returns: Vector
Remarks:
Divides X by the product of Y and Z without temporary objects.
Examples
uses MtxVec, MtxExpr, Math387;
var
X, Y, Z, A1, A2, A3: Vector;
begin
X := [6,8,10,12];
Y := [1,2,3,4];
Z := [2,2,2,2];
A1 := X * (Y * Z);
A2 := DivideElem(X, Y, Z);
A3.Divide(X, Y, Z);
if not A2.IsEqual(A1) then ERaise('Problem');
if not A3.IsEqual(A1) then ERaise('Problem');
end;
Overload 5: function DivideElem(const X: Double; const Y: TMtx; const Z: TMtxVec): Matrix;
Compute xScalar / (Y*Z), when Y is a Matrix
Returns: Matrix
Remarks:
The operation does only per-element math.
Overload 6: function DivideElem(const X: Double; const Y: TVec; const Z: TMtxVec): Vector;
Compute xScalar / (Y*Z)
Returns: Vector
Remarks:
Divides a scalar xScalar by the product of Y and Z without temporary objects. Since the first parameter is scalar, the overload is provided by splitting the second parameter into TVec and TMtx versions.
Examples
var
xScalar: Double;
Y, Z, A1, A2, A3: Vector;
begin
xScalar := 100;
Y := [2, 4, 5, 10];
Z := [1, 2, 2, 2];
A1 := xScalar / (Y * Z);
A2 := DivideElem(xScalar, Y, Z);
A3.Divide(xScalar, Y, Z);
if not A2.IsEqual(A1) then ERaise('Problem');
if not A3.IsEqual(A1) then ERaise('Problem');
end;