MtxExpr.SubAndMul Method

Overload List

#SignatureDescription
1function SubAndMul(const X: TMtx; const Y: TCplx; const Z: TCplx): Matrix;Result = (X - yScalar)*zScalar, where X is a Matrix
2function SubAndMul(const X: TMtx; const xScale: TCplx; Y: TCplx; Z: TCplx): Matrix;
3function SubAndMul(const X: TMtx; const xScale: TCplx; const Y: TCplx; const Z: TMtxVec): Matrix;Result = (X*xScale - yScalar)*Z, where X is a Matrix
4function SubAndMul(const X: TMtx; const xScale: TCplx; const Y: TCplx; const Z: TMtxVec; const zScale: TCplx): Matrix;Result = (X*xScale - yScalar)*Z*zScale, where X is a Matrix
5function SubAndMul(const X: TMtx; const Y: TCplx; const Z: TMtxVec): Matrix;Result = (X - yScalar)*Z, where X is a Matrix
6function SubAndMul(const X: TMtx; Y: TCplx; const Z: TMtxVec; const zScale: TCplx): Matrix;Result = (X - yScalar)*Z*zScale, where X is a Matrix
7function SubAndMul(const X: TMtx; const xScale: TCplx; const Y: TMtxVec; const yScale: TCplx; const Z: TCplx): Matrix;Result = (X*xScale - Y*yScale)*zScale
8function SubAndMul(const X: TMtx; const xScale: TCplx; const Y: TMtxVec; const yScale: TCplx; const Z: TMtxVec; const zScale: TCplx): Matrix;Result = (X*xScale - Y*yScale)*Z*zScale, when X is a Matrix
9function SubAndMul(const X: TMtx; const Y: TMtxVec; const Z: TCplx): Matrix;Result = (X - Y)*zScalar, where X is a Matrix
10function SubAndMul(const X: TMtx; const Y: TMtxVec; const yScale: TCplx; const Z: TCplx): Matrix;Result = (X - Y*yScale)*zScalar, where X is a Matrix
11function SubAndMul(const X: TMtx; const Y: TMtxVec; const yScale: TCplx; const Z: TMtxVec; const zScale: TCplx): Matrix;Result = (X - Y*yScale)*Z*zScale, where X is a Matrix
12function SubAndMul(const X: TMtx; const Y: TMtxVec; const Z: TMtxVec): Matrix;Result = (X - Y)*Z, where X is a Matrix
13function SubAndMul(const X: TMtx; const Y: TMtxVec; const Z: TMtxVec; const zScale: TCplx): Matrix;Result = (X - Y)*Z*zScale, where X is a Matrix
14function SubAndMul(const X: TMtx; const Y: TMtxVec; const Z: TMtxVec; const zScale: Double): Matrix;Result = (X - Y)*Z*zScale, where X is a Matrix
15function SubAndMul(const X: TMtx; const Y: TMtxVec; const Z: Double): Matrix;Result = (X - Y)*zScalar, where X is a Matrix
16function SubAndMul(const X: TMtx; const Y: TMtxVec; const yScale: Double; const Z: TMtxVec; const zScale: Double): Matrix;Result = (X - Y*yScale)*Z*zScale, where X is a Matrix
17function SubAndMul(const X: TMtx; const Y: TMtxVec; const yScale: Double; const Z: Double): Matrix;Result = (X - Y*yScale)*zScalar, where X is a Matrix
18function SubAndMul(const X: TMtx; Y: Double; const Z: TMtxVec): Matrix;Result = (X - yScalar)*Z, where X is a Matrix
19function SubAndMul(const X: TMtx; Y: Double; const Z: TMtxVec; const zScale: Double): Matrix;Result = (X - yScalar)*Z*zScale, where X is a Matrix
20function SubAndMul(const X: TMtx; const xScale: Double; const Y: TMtxVec; const yScale: Double; const Z: TMtxVec; const zScale: Double): Matrix;Result = (X*xScale - Y*yScale)*Z*zScale, when X is a Matrix
21function SubAndMul(const X: TMtx; const xScale: Double; const Y: TMtxVec; const yScale: Double; const Z: Double): Matrix;Result = (X*xScale - Y*yScale)*zScalar, when X is a Matrix
22function SubAndMul(const X: TMtx; Y: Double; Z: Double): Matrix;Result = (X - yScalar)*zScalar, where X is a Matrix
23function SubAndMul(const X: TMtx; const xScale: Double; const Y: Double; const Z: TMtxVec): Matrix;Result = (X*xScale - yScalar)*Z, where X is a Matrix
24function SubAndMul(const X: TMtx; const xScale: Double; Y: Double; const Z: TMtxVec; const zScale: Double): Matrix;Result = (X*xScale - yScalar)*Z*zScale, where X is a Matrix
25function SubAndMul(const X: TMtx; const xScale: Double; Y: Double; Z: Double): Matrix;Result = (X*xScale - yScalar)*zScalar, where X is a Matrix
26function SubAndMul(const X: TVec; const Y: TCplx; const Z: TCplx): Vector;Result = (X - yScalar)*zScalar
27function SubAndMul(const X: TVec; const xScale: TCplx; Y: TCplx; Z: TCplx): Vector;
28function SubAndMul(const X: TVec; const xScale: TCplx; const Y: TCplx; const Z: TMtxVec): Vector;Result = (X*xScale - yScalar)*Z
29function SubAndMul(const X: TVec; const xScale: TCplx; const Y: TCplx; const Z: TMtxVec; const zScale: TCplx): Vector;Result = (X*xScale - yScalar)*Z*zScale, where X is a Matrix
30function SubAndMul(const X: TVec; const Y: TCplx; const Z: TMtxVec): Vector;Result = (X - yScalar)*Z
31function SubAndMul(const X: TVec; Y: TCplx; const Z: TMtxVec; const zScale: TCplx): Vector;Result = (X - yScalar)*Z*zScale
32function SubAndMul(const X: TVec; const xScale: TCplx; const Y: TMtxVec; const yScale: TCplx; const Z: TCplx): Vector;Result = (X*xScale - Y*yScale)*zScale
33function SubAndMul(const X: TVec; const xScale: TCplx; const Y: TMtxVec; const yScale: TCplx; const Z: TMtxVec; const zScale: TCplx): Vector;Result = (X*xScale - Y*yScale)*Z*zScale
34function SubAndMul(const X: TVec; const Y: TMtxVec; const Z: TCplx): Vector;Result = (X - Y)*zScalar
35function SubAndMul(const X: TVec; const Y: TMtxVec; const yScale: TCplx; const Z: TCplx): Vector;Result = (X - Y*yScale)*zScalar
36function SubAndMul(const X: TVec; const Y: TMtxVec; const yScale: TCplx; const Z: TMtxVec; const zScale: TCplx): Vector;Result = (X - Y*yScale)*Z*zScale
37function SubAndMul(const X: TVec; const Y: TMtxVec; const Z: TMtxVec): Vector;Result = (X - Y)*Z
38function SubAndMul(const X: TVec; const Y: TMtxVec; const Z: TMtxVec; const zScale: TCplx): Vector;Result = (X - Y)*Z*zScale
39function SubAndMul(const X: TVec; const Y: TMtxVec; const Z: TMtxVec; const zScale: Double): Vector;Result = (X - Y)*Z*zScale
40function SubAndMul(const X: TVec; const Y: TMtxVec; const Z: Double): Vector;Result = (X - Y)*zScalar
41function SubAndMul(const X: TVec; const Y: TMtxVec; const yScale: Double; const Z: TMtxVec; const zScale: Double): Vector;Result = (X - Y*yScale)*Z*zScale
42function SubAndMul(const X: TVec; const Y: TMtxVec; const yScale: Double; const Z: Double): Vector;Result = (X - Y*yScale)*zScalar
43function SubAndMul(const X: TVec; Y: Double; const Z: TMtxVec): Vector;Result = (X - yScalar)*Z
44function SubAndMul(const X: TVec; Y: Double; const Z: TMtxVec; const zScale: Double): Vector;Result = (X - yScalar)*Z*zScale
45function SubAndMul(const X: TVec; const xScale: Double; const Y: TMtxVec; const yScale: Double; const Z: TMtxVec; const zScale: Double): Vector;Result = (X*xScale - Y*yScale)*Z*zScale
46function SubAndMul(const X: TVec; const xScale: Double; const Y: TMtxVec; const yScale: Double; Z: Double): Vector;Result = (X*xScale - Y*yScale)*zScalar
47function SubAndMul(const X: TVec; Y: Double; Z: Double): Vector;Result = (X - yScalar)*zScalar
48function SubAndMul(const X: TVec; const xScale: Double; const Y: Double; const Z: TMtxVec): Vector;Result = (X*xScale - yScalar)*Z
49function SubAndMul(const X: TVec; const xScale: Double; Y: Double; const Z: TMtxVec; const zScale: Double): Vector;Result = (X*xScale - yScalar)*Z*zScale
50function SubAndMul(const X: TVec; const xScale: Double; Y: Double; Z: Double): Vector;Result = (X*xScale - yScalar)*zScalar

Overload 1: function SubAndMul(const X: TMtx; const Y: TCplx; const Z: TCplx): Matrix;

Compute (X - yScalar)*zScalar, where X is a Matrix

#NameTypeDescription
1XTMtx
2YTCplx
3ZTCplx

Returns: Matrix

Overload 2: function SubAndMul(const X: TMtx; const xScale: TCplx; Y: TCplx; Z: TCplx): Matrix;

#NameTypeDescription
1XTMtx
2xScaleTCplx
3YTCplxscalar
4ZTCplxscalar

Returns: Matrix

Overload 3: function SubAndMul(const X: TMtx; const xScale: TCplx; const Y: TCplx; const Z: TMtxVec): Matrix;

Compute (X*xScale - yScalar)*Z, where X is a Matrix

#NameTypeDescription
1XTMtx
2xScaleTCplx
3YTCplx
4ZTMtxVec

Returns: Matrix

Overload 4: function SubAndMul(const X: TMtx; const xScale: TCplx; const Y: TCplx; const Z: TMtxVec; const zScale: TCplx): Matrix;

Compute (X*xScale - yScalar)*Z*zScale, where X is a Matrix.

#NameTypeDescription
1XTMtx
2xScaleTCplx
3YTCplx
4ZTMtxVec
5zScaleTCplx

Returns: Matrix

Remarks:

The operation does only per-element math.

Overload 5: function SubAndMul(const X: TMtx; const Y: TCplx; const Z: TMtxVec): Matrix;

Compute (X - yScalar)*Z, where X is a Matrix

#NameTypeDescription
1XTMtx
2YTCplx
3ZTMtxVec

Returns: Matrix

Overload 6: function SubAndMul(const X: TMtx; Y: TCplx; const Z: TMtxVec; const zScale: TCplx): Matrix;

Compute (X - yScalar)*Z*zScale, where X is a Matrix

#NameTypeDescription
1XTMtx
2YTCplxscalar
3ZTMtxVec
4zScaleTCplx

Returns: Matrix

Overload 7: function SubAndMul(const X: TMtx; const xScale: TCplx; const Y: TMtxVec; const yScale: TCplx; const Z: TCplx): Matrix;

Compute (X*xScale - Y*yScale)*zScale

#NameTypeDescription
1XTMtx
2xScaleTCplx
3YTMtxVec
4yScaleTCplx
5ZTCplx

Returns: Matrix

Overload 8: function SubAndMul(const X: TMtx; const xScale: TCplx; const Y: TMtxVec; const yScale: TCplx; const Z: TMtxVec; const zScale: TCplx): Matrix;

Compute (X*xScale - Y*yScale)*Z*zScale, when X is a Matrix.

#NameTypeDescription
1XTMtx
2xScaleTCplx
3YTMtxVec
4yScaleTCplx
5ZTMtxVec
6zScaleTCplx

Returns: Matrix

Remarks:

The operation does only per-element math.

Overload 9: function SubAndMul(const X: TMtx; const Y: TMtxVec; const Z: TCplx): Matrix;

Compute (X - Y)*zScalar, where X is a Matrix

#NameTypeDescription
1XTMtx
2YTMtxVec
3ZTCplx

Returns: Matrix

Overload 10: function SubAndMul(const X: TMtx; const Y: TMtxVec; const yScale: TCplx; const Z: TCplx): Matrix;

Compute (X - Y*yScale)*zScalar, where X is a Matrix

#NameTypeDescription
1XTMtx
2YTMtxVec
3yScaleTCplx
4ZTCplx

Returns: Matrix

Overload 11: function SubAndMul(const X: TMtx; const Y: TMtxVec; const yScale: TCplx; const Z: TMtxVec; const zScale: TCplx): Matrix;

Compute (X - Y*yScale)*Z*zScale, where X is a Matrix

#NameTypeDescription
1XTMtx
2YTMtxVec
3yScaleTCplx
4ZTMtxVec
5zScaleTCplx

Returns: Matrix

Overload 12: function SubAndMul(const X: TMtx; const Y: TMtxVec; const Z: TMtxVec): Matrix;

Compute (X - Y)*Z, where X is a Matrix

#NameTypeDescription
1XTMtx
2YTMtxVec
3ZTMtxVec

Returns: Matrix

Remarks:

The operation does only per-element math.

Overload 13: function SubAndMul(const X: TMtx; const Y: TMtxVec; const Z: TMtxVec; const zScale: TCplx): Matrix;

Compute (X - Y)*Z*zScale, where X is a Matrix

#NameTypeDescription
1XTMtx
2YTMtxVec
3ZTMtxVec
4zScaleTCplx

Returns: Matrix

Overload 14: function SubAndMul(const X: TMtx; const Y: TMtxVec; const Z: TMtxVec; const zScale: Double): Matrix;

Compute (X - Y)*Z*zScale, where X is a Matrix

#NameTypeDescription
1XTMtx
2YTMtxVec
3ZTMtxVec
4zScaleDouble

Returns: Matrix

Remarks:

The operation does only per-element math.

Overload 15: function SubAndMul(const X: TMtx; const Y: TMtxVec; const Z: Double): Matrix;

Compute (X - Y)*zScalar, where X is a Matrix

#NameTypeDescription
1XTMtx
2YTMtxVec
3ZDouble

Returns: Matrix

Overload 16: function SubAndMul(const X: TMtx; const Y: TMtxVec; const yScale: Double; const Z: TMtxVec; const zScale: Double): Matrix;

Compute (X - Y*yScale)*Z*zScale, where X is a Matrix

#NameTypeDescription
1XTMtx
2YTMtxVec
3yScaleDouble
4ZTMtxVec
5zScaleDouble

Returns: Matrix

Remarks:

The operation does only per-element math.

Overload 17: function SubAndMul(const X: TMtx; const Y: TMtxVec; const yScale: Double; const Z: Double): Matrix;

Compute (X - Y*yScale)*zScalar, where X is a Matrix

#NameTypeDescription
1XTMtx
2YTMtxVec
3yScaleDouble
4ZDouble

Returns: Matrix

Overload 18: function SubAndMul(const X: TMtx; Y: Double; const Z: TMtxVec): Matrix;

Compute (X - yScalar)*Z, where X is a Matrix

#NameTypeDescription
1XTMtx
2YDoublescalar
3ZTMtxVec

Returns: Matrix

Remarks:

The operation does only per-element math.

Overload 19: function SubAndMul(const X: TMtx; Y: Double; const Z: TMtxVec; const zScale: Double): Matrix;

Compute (X - yScalar)*Z*zScale, where X is a Matrix

#NameTypeDescription
1XTMtx
2YDoublescalar
3ZTMtxVec
4zScaleDouble

Returns: Matrix

Remarks:

The operation does only per-element math.

Overload 20: function SubAndMul(const X: TMtx; const xScale: Double; const Y: TMtxVec; const yScale: Double; const Z: TMtxVec; const zScale: Double): Matrix;

Compute (X*xScale - Y*yScale)*Z*zScale, when X is a Matrix.

#NameTypeDescription
1XTMtx
2xScaleDouble
3YTMtxVec
4yScaleDouble
5ZTMtxVec
6zScaleDouble

Returns: Matrix

Remarks:

The operation does only per-element math.

Overload 21: function SubAndMul(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.

#NameTypeDescription
1XTMtx
2xScaleDouble
3YTMtxVec
4yScaleDouble
5ZDouble

Returns: Matrix

Remarks:

The operation does only per-element math.

Overload 22: function SubAndMul(const X: TMtx; Y: Double; Z: Double): Matrix;

Compute (X - yScalar)*zScalar, where X is a Matrix

#NameTypeDescription
1XTMtx
2YDoublescalar
3ZDoublescalar

Returns: Matrix

Remarks:

The operation does only per-element math.

Overload 23: function SubAndMul(const X: TMtx; const xScale: Double; const Y: Double; const Z: TMtxVec): Matrix;

Compute (X*xScale - yScalar)*Z, where X is a Matrix

#NameTypeDescription
1XTMtx
2xScaleDouble
3YDouble
4ZTMtxVec

Returns: Matrix

Remarks:

The operation does only per-element math.

Overload 24: function SubAndMul(const X: TMtx; const xScale: Double; Y: Double; const Z: TMtxVec; const zScale: Double): Matrix;

Compute (X*xScale - yScalar)*Z*zScale, where X is a Matrix.

#NameTypeDescription
1XTMtx
2xScaleDouble
3YDoublescalar
4ZTMtxVec
5zScaleDouble

Returns: Matrix

Remarks:

The operation does only per-element math.

Overload 25: function SubAndMul(const X: TMtx; const xScale: Double; Y: Double; Z: Double): Matrix;

Compute (X*xScale - yScalar)*zScalar, where X is a Matrix.

#NameTypeDescription
1XTMtx
2xScaleDouble
3YDoublescalar
4ZDoublescalar

Returns: Matrix

Overload 26: function SubAndMul(const X: TVec; const Y: TCplx; const Z: TCplx): Vector;

Compute (X - yScalar)*zScalar

#NameTypeDescription
1XTVec
2YTCplx
3ZTCplx

Returns: Vector

Overload 27: function SubAndMul(const X: TVec; const xScale: TCplx; Y: TCplx; Z: TCplx): Vector;

#NameTypeDescription
1XTVec
2xScaleTCplx
3YTCplxscalar
4ZTCplxscalar

Returns: Vector

Overload 28: function SubAndMul(const X: TVec; const xScale: TCplx; const Y: TCplx; const Z: TMtxVec): Vector;

Compute (X*xScale - yScalar)*Z

#NameTypeDescription
1XTVec
2xScaleTCplx
3YTCplx
4ZTMtxVec

Returns: Vector

Overload 29: function SubAndMul(const X: TVec; const xScale: TCplx; const Y: TCplx; const Z: TMtxVec; const zScale: TCplx): Vector;

Compute (X*xScale - yScalar)*Z*zScale, where X is a Matrix.

#NameTypeDescription
1XTVec
2xScaleTCplx
3YTCplx
4ZTMtxVec
5zScaleTCplx

Returns: Vector

Remarks:

The operation does only per-element math.

Overload 30: function SubAndMul(const X: TVec; const Y: TCplx; const Z: TMtxVec): Vector;

Compute (X - yScalar)*Z

#NameTypeDescription
1XTVec
2YTCplx
3ZTMtxVec

Returns: Vector

Overload 31: function SubAndMul(const X: TVec; Y: TCplx; const Z: TMtxVec; const zScale: TCplx): Vector;

Compute (X - yScalar)*Z*zScale

#NameTypeDescription
1XTVec
2YTCplxscalar
3ZTMtxVec
4zScaleTCplx

Returns: Vector

Overload 32: function SubAndMul(const X: TVec; const xScale: TCplx; const Y: TMtxVec; const yScale: TCplx; const Z: TCplx): Vector;

Compute (X*xScale - Y*yScale)*zScale

#NameTypeDescription
1XTVec
2xScaleTCplx
3YTMtxVec
4yScaleTCplx
5ZTCplx

Returns: Vector

Overload 33: function SubAndMul(const X: TVec; const xScale: TCplx; const Y: TMtxVec; const yScale: TCplx; const Z: TMtxVec; const zScale: TCplx): Vector;

Compute (X*xScale - Y*yScale)*Z*zScale.

#NameTypeDescription
1XTVec
2xScaleTCplx
3YTMtxVec
4yScaleTCplx
5ZTMtxVec
6zScaleTCplx

Returns: Vector

Remarks:

The operation does only per-element math.

Overload 34: function SubAndMul(const X: TVec; const Y: TMtxVec; const Z: TCplx): Vector;

Compute (X - Y)*zScalar

#NameTypeDescription
1XTVec
2YTMtxVec
3ZTCplx

Returns: Vector

Overload 35: function SubAndMul(const X: TVec; const Y: TMtxVec; const yScale: TCplx; const Z: TCplx): Vector;

Compute (X - Y*yScale)*zScalar

#NameTypeDescription
1XTVec
2YTMtxVec
3yScaleTCplx
4ZTCplx

Returns: Vector

Overload 36: function SubAndMul(const X: TVec; const Y: TMtxVec; const yScale: TCplx; const Z: TMtxVec; const zScale: TCplx): Vector;

Compute (X - Y*yScale)*Z*zScale

#NameTypeDescription
1XTVec
2YTMtxVec
3yScaleTCplx
4ZTMtxVec
5zScaleTCplx

Returns: Vector

Overload 37: function SubAndMul(const X: TVec; const Y: TMtxVec; const Z: TMtxVec): Vector;

Compute (X - Y)*Z

#NameTypeDescription
1XTVec
2YTMtxVec
3ZTMtxVec

Returns: Vector

Remarks:

Computes the product of the difference between X and Y multiplied by Z without creating temporary objects.

Examples
var
    X, Y, Z, A1, A2, A3: Vector;
begin
X := [5, 6, 7, 8];
Y := [1, 2, 3, 4];
Z := [2, 2, 2, 2];
A1 := (X - Y) * Z;
A2 := SubAndMul(X, Y, Z);
A3.SubAndMul(X, Y, Z);
if not A2.IsEqual(A1) then ERaise('Problem');
if not A3.IsEqual(A1) then ERaise('Problem');
end;

Overload 38: function SubAndMul(const X: TVec; const Y: TMtxVec; const Z: TMtxVec; const zScale: TCplx): Vector;

Compute (X - Y)*Z*zScale

#NameTypeDescription
1XTVec
2YTMtxVec
3ZTMtxVec
4zScaleTCplx

Returns: Vector

Overload 39: function SubAndMul(const X: TVec; const Y: TMtxVec; const Z: TMtxVec; const zScale: Double): Vector;

Compute (X - Y)*Z*zScale

#NameTypeDescription
1XTVec
2YTMtxVec
3ZTMtxVec
4zScaleDouble

Returns: Vector

Remarks:

Computes the product of (X - Y) multiplied by Z and then scaled by zScale, without creating temporary objects.

Examples
var
    zScale: Double;
    X, Y, Z, A1, A2, A3: Vector;
begin
zScale := 3.0;
X := [5, 6, 7, 8];
Y := [1, 2, 3, 4];
Z := [2, 2, 2, 2];
A1 := (X - Y) * Z * zScale;
A2 := SubAndMul(X, Y, Z, zScale);
A3.SubAndMul(X, Y, Z, zScale);
if not A2.IsEqual(A1) then ERaise('Problem');
if not A3.IsEqual(A1) then ERaise('Problem');
end;

Overload 40: function SubAndMul(const X: TVec; const Y: TMtxVec; const Z: Double): Vector;

Compute (X - Y)*zScalar

#NameTypeDescription
1XTVec
2YTMtxVec
3ZDouble

Returns: Vector

Remarks:

Computes the product of (X - Y) multiplied by a scalar zScalar without temporary objects.

Overload 41: function SubAndMul(const X: TVec; const Y: TMtxVec; const yScale: Double; const Z: TMtxVec; const zScale: Double): Vector;

Compute (X - Y*yScale)*Z*zScale

#NameTypeDescription
1XTVec
2YTMtxVec
3yScaleDouble
4ZTMtxVec
5zScaleDouble

Returns: Vector

Remarks:

Computes the product of (X minus Y scaled by yScale) multiplied by Z and then by zScale, without creating temporary objects.

Examples
var
    yScale: Double;
    X, Y, Z, A1, A2, A3: Vector;
begin
yScale := 1.5, zScale = 2.0;
X := [5, 6, 7, 8];
Y := [1, 2, 3, 4];
Z := [2, 2, 2, 2];
A1 := (X - Y * yScale) * Z * zScale;
A2 := SubAndMul(X, yScale, Y, yScale, Z, zScale);
A3.SubAndMul(X, yScale, Y, yScale, Z, zScale);
if not A2.IsEqual(A1) then ERaise('Problem');
if not A3.IsEqual(A1) then ERaise('Problem');
end;

Overload 42: function SubAndMul(const X: TVec; const Y: TMtxVec; const yScale: Double; const Z: Double): Vector;

Compute (X - Y*yScale)*zScalar

#NameTypeDescription
1XTVec
2YTMtxVec
3yScaleDouble
4ZDouble

Returns: Vector

Remarks:

Computes the expression where Y is first scaled by yScale, then subtracted from X, and the resulting vector is multiplied by a scalar zScalar. This is performed without creating temporary objects.

Overload 43: function SubAndMul(const X: TVec; Y: Double; const Z: TMtxVec): Vector;

Compute (X - yScalar)*Z

#NameTypeDescription
1XTVec
2YDoublescalar
3ZTMtxVec

Returns: Vector

Remarks:

Subtracts the scalar yScalar from X and multiplies the result element-wise by Z, without creating temporary objects.

Overload 44: function SubAndMul(const X: TVec; Y: Double; const Z: TMtxVec; const zScale: Double): Vector;

Compute (X - yScalar)*Z*zScale

#NameTypeDescription
1XTVec
2YDoublescalar
3ZTMtxVec
4zScaleDouble

Returns: Vector

Remarks:

Subtracts a scalar yScalar from X, then multiplies the result element-wise by Z, and finally scales the product by zScale. This operation is performed without temporary objects.

Overload 45: function SubAndMul(const X: TVec; const xScale: Double; const Y: TMtxVec; const yScale: Double; const Z: TMtxVec; const zScale: Double): Vector;

Compute (X*xScale - Y*yScale)*Z*zScale

#NameTypeDescription
1XTVec
2xScaleDouble
3YTMtxVec
4yScaleDouble
5ZTMtxVec
6zScaleDouble

Returns: Vector

Remarks:

Computes the product of (X scaled by xScale minus Y scaled by yScale) multiplied by Z scaled by zScale, without creating temporary objects.

Examples
var
    xScale: Double;
    X, Y, Z, A1, A2, A3: Vector;
begin
xScale := 1.0, yScale = 2.0, zScale = 3.0;
X := [1, 2, 3, 4];
Y := [2, 3, 4, 5];
Z := [3, 4, 5, 6];
A1 := (X * xScale - Y * yScale) * Z * zScale;
A2 := SubAndMul(X, xScale, Y, yScale, Z, zScale);
A3.SubAndMul(X, xScale, Y, yScale, Z, zScale);
if not A2.IsEqual(A1) then ERaise('Problem');
if not A3.IsEqual(A1) then ERaise('Problem');
end;

Overload 46: function SubAndMul(const X: TVec; const xScale: Double; const Y: TMtxVec; const yScale: Double; Z: Double): Vector;

Compute (X*xScale - Y*yScale)*zScalar

#NameTypeDescription
1XTVec
2xScaleDouble
3YTMtxVec
4yScaleDouble
5ZDoublescalar

Returns: Vector

Remarks:

Computes the product of (X scaled by xScale minus Y scaled by yScale) multiplied by a scalar zScalar, without creating temporary objects.

Examples
var
    xScale: Double;
    X, Y, A1, A2, A3: Vector;
begin
xScale := 1.0, yScale = 2.0, zScalar = 3.0;
X := [1, 2, 3, 4];
Y := [2, 3, 4, 5];
A1 := (X * xScale - Y * yScale) * zScalar;
A2 := SubAndMul(X, xScale, Y, yScale, zScalar);
A3.SubAndMul(X, xScale, Y, yScale, zScalar);
if not A2.IsEqual(A1) then ERaise('Problem');
if not A3.IsEqual(A1) then ERaise('Problem');
end;

Overload 47: function SubAndMul(const X: TVec; Y: Double; Z: Double): Vector;

Compute (X - yScalar)*zScalar

#NameTypeDescription
1XTVec
2YDoublescalar
3ZDoublescalar

Returns: Vector

Remarks:

Computes the result of subtracting a scalar yScalar from X and then multiplying by a scalar zScalar, without creating temporary objects.

Overload 48: function SubAndMul(const X: TVec; const xScale: Double; const Y: Double; const Z: TMtxVec): Vector;

Compute (X*xScale - yScalar)*Z

#NameTypeDescription
1XTVec
2xScaleDouble
3YDouble
4ZTMtxVec

Returns: Vector

Remarks:

Multiplies X by xScale, subtracts the scalar yScalar, and then multiplies the result element-wise by Z, without creating temporary objects.

Overload 49: function SubAndMul(const X: TVec; const xScale: Double; Y: Double; const Z: TMtxVec; const zScale: Double): Vector;

Compute (X*xScale - yScalar)*Z*zScale

#NameTypeDescription
1XTVec
2xScaleDouble
3YDoublescalar
4ZTMtxVec
5zScaleDouble

Returns: Vector

Remarks:

Computes the expression (X*xScale - yScalar) multiplied by Z*zScale without temporary objects.

Examples
var
    xScale: Double;
    X, Z, A1, A2, A3: Vector;
begin
xScale := 1.0, yScalar = 2.0, zScale = 3.0;
X := [1, 2, 3, 4];
Z := [3, 4, 5, 6];
A1 := (X * xScale - yScalar) * Z * zScale;
A2 := SubAndMul(X, xScale, yScalar, Z, zScale);
A3.SubAndMul(X, xScale, yScalar, Z, zScale);
if not A2.IsEqual(A1) then ERaise('Problem');
if not A3.IsEqual(A1) then ERaise('Problem');
end;

Overload 50: function SubAndMul(const X: TVec; const xScale: Double; Y: Double; Z: Double): Vector;

Compute (X*xScale - yScalar)*zScalar

#NameTypeDescription
1XTVec
2xScaleDouble
3YDoublescalar
4ZDoublescalar

Returns: Vector

Remarks:

Computes the expression (X*xScale - yScalar) multiplied by a scalar zScalar without temporary objects.

Examples
var
    xScale: Double;
    X, A1, A2, A3: Vector;
begin
xScale := 1.0, yScalar = 2.0, zScalar = 3.0;
X := [1, 2, 3, 4];
A1 := (X * xScale - yScalar) * zScalar;
A2 := SubAndMul(X, xScale, yScalar, zScalar);
A3.SubAndMul(X, xScale, yScalar, zScalar);
if not A2.IsEqual(A1) then ERaise('Problem');
if not A3.IsEqual(A1) then ERaise('Problem');
end;