MtxExpr.AddAndMul Method

Overload List

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

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

#NameTypeDescription
1XTMtx
2YTCplx
3ZTCplx

Returns: Matrix

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

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

#NameTypeDescription
1XTMtx
2xScaleTCplx
3YTCplxscalar
4ZTCplxscalar

Returns: Matrix

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

#NameTypeDescription
1XTMtx
2xScaleTCplx
3YTCplxscalar
4ZTMtxVecsource TVec or TMtx

Returns: Matrix

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

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

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

Returns: Matrix

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

#NameTypeDescription
1XTMtx
2YTCplx
3ZTMtxVec

Returns: Matrix

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

#NameTypeDescription
1XTMtx
2YTCplx
3ZTMtxVecsource TVec or TMtx
4zScaleTCplxscalar

Returns: Matrix

Overload 7: function AddAndMul(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

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

Returns: Matrix

Overload 8: function AddAndMul(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, where X is a Matrix

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

Returns: Matrix

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

#NameTypeDescription
1XTMtx
2YTMtxVec
3ZTCplx

Returns: Matrix

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

#NameTypeDescription
1XTMtx
2YTMtxVec
3yScaleTCplxscalar
4ZTCplxscalar

Returns: Matrix

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

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

Returns: Matrix

Overload 12: function AddAndMul(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 AddAndMul(const X: TMtx; const Y: TMtxVec; Z: TMtxVec; zScale: TCplx): Matrix;

#NameTypeDescription
1XTMtx
2YTMtxVec
3ZTMtxVecsource TVec or TMtx
4zScaleTCplxscalar

Returns: Matrix

Overload 14: function AddAndMul(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 AddAndMul(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 AddAndMul(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 AddAndMul(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 AddAndMul(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 AddAndMul(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 AddAndMul(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 AddAndMul(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 AddAndMul(const X: TMtx; Y: Double; Z: Double): Matrix;

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

#NameTypeDescription
1XTMtx
2YDoublescalar
3ZDoublescalar

Returns: Matrix

Overload 23: function AddAndMul(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 AddAndMul(const X: TMtx; const xScale: Double; Y: Double; const Z: TMtxVec; const zScale: Double): Matrix;

Compute (X*xScale + yScalar)*Z*zScale, when X is a Matrix.

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

Returns: Matrix

Remarks:

The operation does only per-element math.

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

Compute (X*xScale + yScalar)*zScalar, when X is a Matrix.

#NameTypeDescription
1XTMtx
2xScaleDouble
3YDoublescalar
4ZDoublescalar

Returns: Matrix

Remarks:

The operation does only per-element math.

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

#NameTypeDescription
1XTVec
2YTCplx
3ZTCplx

Returns: Vector

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

Compute (X*xScale + yScalar)*zScalar

#NameTypeDescription
1XTVec
2xScaleTCplx
3YTCplxscalar
4ZTCplxscalar

Returns: Vector

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

#NameTypeDescription
1XTVec
2xScaleTCplx
3YTCplxscalar
4ZTMtxVecsource TVec or TMtx

Returns: Vector

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

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

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

Returns: Vector

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

#NameTypeDescription
1XTVec
2YTCplx
3ZTMtxVec

Returns: Vector

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

#NameTypeDescription
1XTVec
2YTCplx
3ZTMtxVecsource TVec or TMtx
4zScaleTCplxscalar

Returns: Vector

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

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

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

Returns: Vector

Overload 33: function AddAndMul(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

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

#NameTypeDescription
1XTVec
2YTMtxVec
3ZTCplx

Returns: Vector

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

#NameTypeDescription
1XTVec
2YTMtxVec
3yScaleTCplxscalar
4ZTCplxscalar

Returns: Vector

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

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

Returns: Vector

Overload 37: function AddAndMul(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 sum of X and Y multiplied by Z without temporary objects.

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

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

#NameTypeDescription
1XTVec
2YTMtxVec
3ZTMtxVecsource TVec or TMtx
4zScaleTCplxscalar

Returns: Vector

Overload 39: function AddAndMul(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 by the scalar zScale, all without creating temporary objects.

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

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

Compute (X + Y)*zScalar

#NameTypeDescription
1XTVec
2YTMtxVec
3ZDouble

Returns: Vector

Remarks:

Computes the sum of X and Y multiplied by the scalar zScalar without temporary objects.

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

Overload 41: function AddAndMul(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 plus Y scaled by yScale) multiplied by Z and then by zScale, without temporary objects.

Examples
var
    yScale: Double;
    X, Y, Z, A1, A2, A3: Vector;
begin
yScale := 1.5, zScale = 2.0;
X := [1, 2, 3, 4];
Y := [2, 3, 4, 5];
Z := [3, 4, 5, 6];
A1 := (X + Y * yScale) * Z * zScale;
A2 := AddAndMul(X, yScale, Y, yScale, Z, zScale);
A3.AddAndMul(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 AddAndMul(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 (X + Y*yScale) multiplied by a scalar zScalar without temporary objects.

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

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

Compute (X + yScalar)*Z

#NameTypeDescription
1XTVec
2YDoublescalar
3ZTMtxVec

Returns: Vector

Remarks:

Computes the expression (X plus the scalar yScalar) multiplied by Z, without creating temporary objects.

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

Overload 44: function AddAndMul(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:

Computes the expression (X + yScalar) multiplied by Z and then by zScale, without creating temporary objects.

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

Overload 45: function AddAndMul(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 expression (X*xScale + Y*yScale) multiplied by Z*zScale without 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 := AddAndMul(X, xScale, Y, yScale, Z, zScale);
A3.AddAndMul(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 AddAndMul(const X: TVec; const xScale: Double; const Y: TMtxVec; const yScale: Double; const Z: Double): Vector;

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

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

Returns: Vector

Remarks:

Computes the expression (X*xScale + Y*yScale) multiplied by a scalar 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 := [1, 2, 3, 4];
Y := [2, 3, 4, 5];
A1 := (X * xScale + Y * yScale) * zScalar;
A2 := AddAndMul(X, xScale, Y, yScale, zScalar);
A3.AddAndMul(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 AddAndMul(const X: TVec; Y: Double; Z: Double): Vector;

Compute (X + yScalar)*zScalar

#NameTypeDescription
1XTVec
2YDoublescalar
3ZDoublescalar

Returns: Vector

Remarks:

Computes the result of adding the scalar yScalar to X and then multiplying by the scalar zScalar, without creating temporary objects.

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

Overload 48: function AddAndMul(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:

Computes the expression (X scaled by xScale plus the scalar yScalar) multiplied by Z, without creating temporary objects.

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

Overload 49: function AddAndMul(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 where X is scaled by xScale, then added to a scalar yScalar, and the result is multiplied element-wise by Z and finally scaled by zScale. This operation is performed without creating 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 := AddAndMul(X, xScale, yScalar, Z, zScale);
A3.AddAndMul(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 AddAndMul(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 result of multiplying X by xScale, adding a scalar yScalar, and then multiplying the entire result by a scalar zScalar, all without creating 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 := AddAndMul(X, xScale, yScalar, zScalar);
A3.AddAndMul(X, xScale, yScalar, zScalar);
if not A2.IsEqual(A1) then ERaise('Problem');
if not A3.IsEqual(A1) then ERaise('Problem');
end;