Overload List
Overload 1: function AddAndMul(const X: TMtx; const xScale: TCplx; Y: TCplx; Z: TCplx): Matrix;
Compute (X*xScale + yScalar)*zScalar, where X is a Matrix
Returns: Matrix
Overload 2: 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
Returns: Matrix
Overload 3: 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
Returns: Matrix
Overload 4: 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
Returns: Matrix
Overload 5: function AddAndMul(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 AddAndMul(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 AddAndMul(const X: TMtx; const Y: TMtxVec; const Z: Double): Matrix;
Compute (X + Y)*zScalar, where X is a Matrix
Returns: Matrix
Overload 8: 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
Returns: Matrix
The operation does only per-element math.
Overload 9: 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.
Returns: Matrix
Overload 10: function AddAndMul(const X: TMtx; Y: Double; const Z: TMtxVec): Matrix;
Compute (X + yScalar)*Z, where X is a Matrix
Returns: Matrix
The operation does only per-element math.
Overload 11: function AddAndMul(const X: TMtx; Y: Double; const Z: TMtxVec; const zScale: Double): Matrix;
Compute (X + yScalar)*Z*zScale, where X is a Matrix
Returns: Matrix
The operation does only per-element math.
Overload 12: 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.
Returns: Matrix
The operation does only per-element math.
Overload 13: 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.
Returns: Matrix
The operation does only per-element math.
Overload 14: function AddAndMul(const X: TMtx; Y: Double; Z: Double): Matrix;
Compute (X + yScalar)*zScalar, where X is a Matrix
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TMtx | |
| 2 | Y | Double | scalar |
| 3 | Z | Double | scalar |
Returns: Matrix
Overload 15: 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.
Returns: Matrix
The operation does only per-element math.
Overload 16: 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.
Returns: Matrix
The operation does only per-element math.
Overload 17: function AddAndMul(const X: TMtx; const xScale: Double; Y: Double; Z: Double): Matrix;
Compute (X*xScale + yScalar)*zScalar, when X is a Matrix.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TMtx | |
| 2 | xScale | Double | |
| 3 | Y | Double | scalar |
| 4 | Z | Double | scalar |
Returns: Matrix
The operation does only per-element math.
Overload 18: function AddAndMul(const X: TVec; const xScale: TCplx; Y: TCplx; Z: TCplx): Vector;
Compute (X*xScale + yScalar)*zScalar
Returns: Vector
Overload 19: function AddAndMul(const X: TVec; const xScale: TCplx; Y: TCplx; const Z: TMtxVec; const zScale: TCplx): Vector;
Compute (X*xScale + yScalar)*Z*zScale
Returns: Vector
Overload 20: function AddAndMul(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 21: 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
Returns: Vector
Overload 22: function AddAndMul(const X: TVec; const Y: TMtxVec; const Z: TMtxVec): Vector;
Compute (X + Y)*Z
Returns: Vector
Computes the product of the sum of X and Y multiplied by Z without temporary objects.
uses MtxVec, MtxExpr, Math387;
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 23: function AddAndMul(const X: TVec; const Y: TMtxVec; const Z: TMtxVec; const zScale: Double): Vector;
Compute (X + Y)*Z*zScale
Returns: Vector
Computes the product of (X + Y) multiplied by Z and then by the scalar 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 := [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 24: function AddAndMul(const X: TVec; const Y: TMtxVec; const Z: Double): Vector;
Compute (X + Y)*zScalar
Returns: Vector
Computes the sum of X and Y multiplied by the scalar zScalar without temporary objects.
uses MtxVec, MtxExpr, Math387;
var
X, Y, A1, A2, A3: Vector;
zScalar: Double;
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 25: function AddAndMul(const X: TVec; const Y: TMtxVec; const yScale: Double; const Z: TMtxVec; const zScale: Double): Vector;
Compute (X + Y*yScale)*Z*zScale
Returns: Vector
Computes the product of (X plus Y scaled by yScale) multiplied by Z and then by zScale, without temporary objects.
uses MtxVec, MtxExpr, Math387;
var
X, Y, Z, A1, A2, A3: Vector;
yScale, zScale: Double;
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); // Note: Overload parameter order as needed.
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 26: function AddAndMul(const X: TVec; const Y: TMtxVec; const yScale: Double; const Z: Double): Vector;
Compute (X + Y*yScale)*zScalar
Returns: Vector
Computes the expression (X + Y*yScale) multiplied by a scalar zScalar without temporary objects.
uses MtxVec, MtxExpr, Math387;
var
X, Y, A1, A2, A3: Vector;
yScale, zScalar: Double;
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 27: function AddAndMul(const X: TVec; Y: Double; const Z: TMtxVec): Vector;
Compute (X + yScalar)*Z
Returns: Vector
Computes the expression (X plus the scalar yScalar) multiplied by Z, without creating temporary objects.
uses MtxVec, MtxExpr, Math387;
var
X, Z, A1, A2, A3: Vector;
yScalar: Double;
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 28: function AddAndMul(const X: TVec; Y: Double; const Z: TMtxVec; const zScale: Double): Vector;
Compute (X + yScalar)*Z*zScale
Returns: Vector
Computes the expression (X + yScalar) multiplied by Z and then by zScale, without creating temporary objects.
uses MtxVec, MtxExpr, Math387;
var
X, Z, A1, A2, A3: Vector;
yScalar, zScale: Double;
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 29: 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
Returns: Vector
Computes the expression (X*xScale + Y*yScale) multiplied by Z*zScale without temporary objects.
uses MtxVec, MtxExpr, Math387;
var
X, Y, Z, A1, A2, A3: Vector;
xScale, yScale, zScale: Double;
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 30: function AddAndMul(const X: TVec; const xScale: Double; const Y: TMtxVec; const yScale: Double; const Z: Double): Vector;
Compute (X*xScale + Y*yScale)*zScalar
Returns: Vector
Computes the expression (X*xScale + Y*yScale) multiplied by a scalar zScalar without temporary objects.
uses MtxVec, MtxExpr, Math387;
var
X, Y, A1, A2, A3: Vector;
xScale, yScale, zScalar: Double;
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 31: function AddAndMul(const X: TVec; Y: Double; Z: Double): Vector;
Compute (X + yScalar)*zScalar
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TVec | |
| 2 | Y | Double | scalar |
| 3 | Z | Double | scalar |
Returns: Vector
Computes the result of adding the scalar yScalar to X and then multiplying by the scalar zScalar, without creating temporary objects.
uses MtxVec, MtxExpr, Math387;
var
X, A1, A2, A3: Vector;
yScalar, zScalar: Double;
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 32: function AddAndMul(const X: TVec; const xScale: Double; const Y: Double; const Z: TMtxVec): Vector;
Compute (X*xScale + yScalar)*Z
Returns: Vector
Computes the expression (X scaled by xScale plus the scalar yScalar) multiplied by Z, without creating temporary objects.
uses MtxVec, MtxExpr, Math387;
var
X, Z, A1, A2, A3: Vector;
xScale, yScalar: Double;
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 33: function AddAndMul(const X: TVec; const xScale: Double; Y: Double; const Z: TMtxVec; const zScale: Double): Vector;
Compute (X*xScale + yScalar)*Z*zScale
Returns: Vector
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.
uses MtxVec, MtxExpr, Math387;
var
X, Z, A1, A2, A3: Vector;
xScale, yScalar, zScale: Double;
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 34: function AddAndMul(const X: TVec; const xScale: Double; Y: Double; Z: Double): Vector;
Compute (X*xScale + yScalar)*zScalar
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TVec | |
| 2 | xScale | Double | |
| 3 | Y | Double | scalar |
| 4 | Z | Double | scalar |
Returns: Vector
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.
uses MtxVec, MtxExpr, Math387;
var
X, A1, A2, A3: Vector;
xScale, yScalar, zScalar: Double;
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;