Overload List
Overload 1: function DivAndSub(const X: TMtx; const Y: TMtxVec; const Z: TCplx): Matrix;
Compute X/Y - zScalar, where X is a Matrix
Returns: Matrix
Overload 2: function DivAndSub(const X: TMtx; const Y: TMtxVec; const xyScale: TCplx; const Z: TCplx): Matrix;
Compute (X / Y) * xyScale - zScalar, where X is a Matrix
Returns: Matrix
The operation does only per-element math.
Overload 3: function DivAndSub(const X: TMtx; const Y: TMtxVec; const xyScale: TCplx; const Z: TMtxVec): Matrix;
Compute X/Y*xyScale - Z, where X is a Matrix
Returns: Matrix
Overload 4: function DivAndSub(const X: TMtx; const Y: TMtxVec; const xyScale: TCplx; const Z: TMtxVec; const zScale: TCplx): Matrix;
Compute (X / Y) * xyScale - Z*zScale, where X is a Matrix
Returns: Matrix
The operation does only per-element math.
Overload 5: function DivAndSub(const X: TMtx; const Y: TMtxVec; const Z: TMtxVec): Matrix;
Compute X/Y - Z, where X is a Matrix
Returns: Matrix
The operation does only per-element math.
Overload 6: function DivAndSub(const X: TMtx; const Y: TMtxVec; const Z: TMtxVec; const zScale: TCplx): Matrix;
Compute X/Y - Z*zScale, where X is a Matrix
Returns: Matrix
Overload 7: function DivAndSub(const X: TMtx; const Y: TMtxVec; const Z: TMtxVec; const zScale: Double): Matrix;
Compute X/Y - Z*zScale, where X is a Matrix
Returns: Matrix
The operation does only per-element math.
Overload 8: function DivAndSub(const X: TMtx; const Y: TMtxVec; const Z: Double): Matrix;
Compute X/Y - zScalar, where X is a Matrix
Returns: Matrix
The operation does only per-element math.
Overload 9: function DivAndSub(const X: TMtx; const Y: TMtxVec; const xyScale: Double; const Z: TMtxVec): Matrix;
Compute X/Y*xyScale - Z, where X is a Matrix
Returns: Matrix
The operation does only per-element math.
Overload 10: function DivAndSub(const X: TMtx; const Y: TMtxVec; const xyScale: Double; const Z: TMtxVec; const zScale: Double): Matrix;
Compute (X / Y) * xyScale - Z*zScale, where X is a Matrix
Returns: Matrix
The operation does only per-element math.
Overload 11: function DivAndSub(const X: TMtx; const Y: TMtxVec; const xyScale: Double; const Z: Double): Matrix;
Compute (X / Y) * xyScale - zScalar, where X is a Matrix
Returns: Matrix
The operation does only per-element math.
Overload 12: function DivAndSub(const X: TVec; const Y: TMtxVec; const Z: TCplx): Vector;
Overload 13: function DivAndSub(const X: TVec; const Y: TMtxVec; const xyScale: TCplx; const Z: TCplx): Vector;
Compute (X / Y) * xyScale - zScalar
Returns: Vector
The operation does only per-element math.
Overload 14: function DivAndSub(const X: TVec; const Y: TMtxVec; const xyScale: TCplx; const Z: TMtxVec): Vector;
Compute X/Y*xyScale - Z
Returns: Vector
Overload 15: function DivAndSub(const X: TVec; const Y: TMtxVec; const xyScale: TCplx; const Z: TMtxVec; const zScale: TCplx): Vector;
Compute (X / Y) * xyScale - Z*zScale
Returns: Vector
The operation does only per-element math.
Overload 16: function DivAndSub(const X: TVec; const Y: TMtxVec; const Z: TMtxVec): Vector;
Compute X/Y - Z
Returns: Vector
Divides X by Y element-wise and then subtracts Z, all without creating temporary objects.
uses MtxVec, MtxExpr, Math387;
var
X, Y, Z, A1, A2, A3: Vector;
begin
X := [6,8,10,12];
Y := [2,2,2,2];
Z := [1,1,1,1];
A1 := (X / Y) - Z; // using operators
A2 := DivAndSub(X, Y, Z); // using the function
A3.DivAndSub(X, Y, Z); // in-place operation
if not A2.IsEqual(A1) then ERaise('Problem');
if not A3.IsEqual(A1) then ERaise('Problem');
end;
Overload 17: function DivAndSub(const X: TVec; const Y: TMtxVec; const Z: TMtxVec; const zScale: TCplx): Vector;
Overload 18: function DivAndSub(const X: TVec; const Y: TMtxVec; const Z: TMtxVec; const zScale: Double): Vector;
Compute X/Y - Z*zScale
Returns: Vector
Divides X by Y element-wise and then subtracts Z multiplied by zScale, all without creating temporary objects.
uses MtxVec, MtxExpr, Math387;
var
X, Y, Z, A1, A2, A3: Vector;
zScale: Double;
begin
zScale := 2.0;
X := [6, 8, 10, 12];
Y := [2, 2, 2, 2];
Z := [1, 1, 1, 1];
A1 := (X / Y) - (Z * zScale);
A2 := DivAndSub(X, Y, Z, zScale);
A3.DivAndSub(X, Y, Z, zScale);
if not A2.IsEqual(A1) then ERaise('Problem');
if not A3.IsEqual(A1) then ERaise('Problem');
end;
Overload 19: function DivAndSub(const X: TVec; const Y: TMtxVec; const Z: Double): Vector;
Compute X/Y - zScalar
Returns: Vector
Divides X by Y element-wise and then subtracts the scalar zScalar, without creating temporary objects.
uses MtxVec, MtxExpr, Math387;
var
X, Y, A1, A2, A3: Vector;
zScalar: Double;
begin
zScalar := 2.0;
X := [6, 8, 10, 12];
Y := [2, 2, 2, 2];
A1 := (X / Y) - zScalar;
A2 := DivAndSub(X, Y, zScalar);
A3.DivAndSub(X, Y, zScalar);
if not A2.IsEqual(A1) then ERaise('Problem');
if not A3.IsEqual(A1) then ERaise('Problem');
end;
Overload 20: function DivAndSub(const X: TVec; const Y: TMtxVec; const xyScale: Double; const Z: TMtxVec): Vector;
Compute X/Y*xyScale - Z
Returns: Vector
Divides X by Y element-wise, multiplies the quotient by xyScale, and then subtracts Z, without creating temporary objects.
uses MtxVec, MtxExpr, Math387;
var
X, Y, Z, A1, A2, A3: Vector;
xyScale: Double;
begin
xyScale := 1.5;
X := [8,10,12,14];
Y := [2,2,2,2];
Z := [1,1,1,1];
A1 := (X / Y) * xyScale - Z;
A2 := DivAndSub(X, Y, xyScale, Z);
A3.DivAndSub(X, Y, xyScale, Z);
if not A2.IsEqual(A1) then ERaise('Problem');
if not A3.IsEqual(A1) then ERaise('Problem');
end;
Overload 21: function DivAndSub(const X: TVec; const Y: TMtxVec; const xyScale: Double; const Z: TMtxVec; const zScale: Double): Vector;
Compute (X / Y) * xyScale - Z*zScale
Returns: Vector
Divides X by Y, scales the quotient by xyScale, then subtracts Z scaled by zScale, all without temporary objects.
uses MtxVec, MtxExpr, Math387;
var
X, Y, Z, A1, A2, A3: Vector;
xyScale, zScale: Double;
begin
xyScale := 1.5;
zScale := 2.0;
X := [8,10,12,14];
Y := [2,2,2,2];
Z := [1,1,1,1];
A1 := (X / Y) * xyScale - Z * zScale;
A2 := DivAndSub(X, xyScale, Y, xyScale, Z, zScale);
A3.DivAndSub(X, xyScale, Y, xyScale, Z, zScale);
if not A2.IsEqual(A1) then ERaise('Problem');
if not A3.IsEqual(A1) then ERaise('Problem');
end;
Overload 22: function DivAndSub(const X: TVec; const Y: TMtxVec; const xyScale: Double; const Z: Double): Vector;
Compute (X / Y) * xyScale - zScalar
Returns: Vector
Computes the expression (X divided by Y) multiplied by xyScale and then subtracts the scalar zScalar, all without temporary objects.
uses MtxVec, MtxExpr, Math387;
var
X, Y, A1, A2, A3: Vector;
xyScale, zScalar: Double;
begin
xyScale := 1.5;
zScalar := 2.0;
X := [8,10,12,14];
Y := [2,2,2,2];
A1 := (X / Y) * xyScale - zScalar;
A2 := DivAndSub(X, xyScale, Y, xyScale, zScalar);
A3.DivAndSub(X, xyScale, Y, xyScale, zScalar);
if not A2.IsEqual(A1) then ERaise('Problem');
if not A3.IsEqual(A1) then ERaise('Problem');
end;