Overload List
Overload 1: function MulAndSub(const X: TMtx; const Y: TCplx; const Z: TMtxVec; const zScale: TCplx): Matrix;
Compute X*yScalar - Z*zScale, where X is a Matrix
Returns: Matrix
Overload 2: function MulAndSub(const X: TMtx; const Y: TMtxVec; const Z: TCplx): Matrix;
Compute X*Y - zScalar, where X is a Matrix
Returns: Matrix
Overload 3: function MulAndSub(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 MulAndSub(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 5: function MulAndSub(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 6: function MulAndSub(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 7: function MulAndSub(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 8: function MulAndSub(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 9: function MulAndSub(const X: TMtx; const Y: Double; const Z: TMtxVec; const zScale: Double): Matrix;
Compute X*yScalar - Z*zScale, where X is a Matrix
Returns: Matrix
Overload 10: function MulAndSub(const X: TVec; const Y: TCplx; const Z: TMtxVec; const zScale: TCplx): Vector;
Compute X*yScalar - Z*zScale
Returns: Vector
Overload 11: function MulAndSub(const X: TVec; const Y: TMtxVec; const Z: TCplx): Vector;
Overload 12: function MulAndSub(const X: TVec; const Y: TMtxVec; const xyScale: TCplx; const Z: TMtxVec): Vector;
Compute X*Y*xyScale - Z
Returns: Vector
Overload 13: function MulAndSub(const X: TVec; const Y: TMtxVec; const Z: TMtxVec): Vector;
Compute X*Y - Z
Returns: Vector
Computes the element-wise product of X and Y, then subtracts Z, without creating temporary objects.
Overload 14: function MulAndSub(const X: TVec; const Y: TMtxVec; const Z: TMtxVec; const zScale: TCplx): Vector;
Overload 15: function MulAndSub(const X: TVec; const Y: TMtxVec; const Z: TMtxVec; const zScale: Double): Vector;
Compute X*Y - Z*zScale
Returns: Vector
Computes the element-wise product of X and Y, then subtracts (Z multiplied by zScale), without creating temporary objects.
Overload 16: function MulAndSub(const X: TVec; const Y: TMtxVec; const Z: Double): Vector;
Compute X*Y - zScalar
Returns: Vector
Computes the element-wise product of X and Y, then subtracts a scalar zScalar, without creating temporary objects.
Overload 17: function MulAndSub(const X: TVec; const Y: TMtxVec; const xyScale: Double; const Z: TMtxVec): Vector;
Compute X*Y*xyScale - Z
Returns: Vector
Computes the element-wise product of X and Y scaled by xyScale, then subtracts Z, without creating temporary objects.
Overload 18: function MulAndSub(const X: TVec; const Y: Double; const Z: TMtxVec; const zScale: Double): Vector;
Compute X*yScalar - Z*zScale
Returns: Vector
Computes the result of multiplying X by a scalar yScalar and then subtracting Z multiplied by zScale, without creating temporary objects.
var
yScalar: Double;
X, Z, A1, A2, A3: Vector;
begin
yScalar := 2.0, zScale = 3.0;
X := [3, 6, 9, 12];
Z := [1, 1, 1, 1];
A1 := (X * yScalar) - (Z * zScale);
A2 := MulAndSub(X, yScalar, Z, zScale);
A3.MulAndSub(X, yScalar, Z, zScale);
if not A2.IsEqual(A1) then ERaise('Problem');
if not A3.IsEqual(A1) then ERaise('Problem');
end;