Overload List
Overload 1: function SubScaledC(const X: TMtx; const xScale: TCplx; const Y: TMtxVec; const yScale: TCplx; const Z: TCplx): Matrix;
Compute X*xScale - Y*yScale - zScalar, where X is a Matrix
Returns: Matrix
Overload 2: function SubScaledC(const X: TMtx; const Y: TMtxVec; const yScale: TCplx; const Z: TCplx): Matrix;
Compute X - Y*yScale - zScalar, where X is a Matrix
Returns: Matrix
Overload 3: function SubScaledC(const X: TMtx; const Y: TMtxVec; const yScale: Double; const Z: Double): Matrix;
Compute X - Y*yScale - zScalar, where X is a Matrix
Returns: Matrix
Overload 4: function SubScaledC(const X: TMtx; const xScale: Double; const Y: TMtxVec; const yScale: Double; const Z: Double): Matrix;
Compute X*xScale - Y*yScale - zScalar, when X is a Matrix
Returns: Matrix
Overload 5: function SubScaledC(const X: TVec; const xScale: TCplx; const Y: TMtxVec; const yScale: TCplx; const Z: TCplx): Vector;
Compute X*xScale - Y*yScale - zScalar
Returns: Vector
Overload 6: function SubScaledC(const X: TVec; const Y: TMtxVec; const yScale: TCplx; const Z: TCplx): Vector;
Compute X - Y*yScale - zScalar
Returns: Vector
Overload 7: function SubScaledC(const X: TVec; const Y: TMtxVec; const yScale: Double; const Z: Double): Vector;
Compute X - Y*yScale - zScalar
Returns: Vector
Remarks:
Computes the result of subtracting Y scaled by yScale and a scalar zScalar from X, without creating temporary objects.
Examples
var
yScale: Double;
X, Y, A1, A3: Vector;
begin
yScale := 1.5, zScalar = 3.0;
X := [5, 6, 7, 8];
Y := [1, 2, 3, 4];
A1 := X - Y * yScale - zScalar;
Vector A2 = SubScaledC(X, yScale, Y, zScalar); // Adjust parameter order if needed.
A3.SubScaledC(X, yScale, Y, zScalar);
if not A2.IsEqual(A1) then ERaise('Problem');
if not A3.IsEqual(A1) then ERaise('Problem');
end;
Overload 8: function SubScaledC(const X: TVec; const xScale: Double; const Y: TMtxVec; const yScale: Double; const Z: Double): Vector;
Compute X*xScale - Y*yScale - zScalar
Returns: Vector
Remarks:
Computes the expression X*xScale - Y*yScale - zScalar without temporary objects.
Examples
var
xScale: Double;
X, Y, A1, A2, A3: Vector;
begin
xScale := 1.0, yScale = 2.0, zScalar = 3.0;
X := [5, 6, 7, 8];
Y := [1, 2, 3, 4];
A1 := X * xScale - Y * yScale - zScalar;
A2 := SubScaledC(X, xScale, Y, yScale, zScalar);
A3.SubScaledC(X, xScale, Y, yScale, zScalar);
if not A2.IsEqual(A1) then ERaise('Problem');
if not A3.IsEqual(A1) then ERaise('Problem');
end;