Vector.AddScaledC Method

Overload List

#SignatureDescription
1function AddScaledC(const X: TMtxVec; const xScale: TCplx; const Y: TMtxVec; const yScale: TCplx; const Z: TCplx): TMtxVec;self = X*xScale + Y*yScale + zScalar
└ indexed: function AddScaledC(const X: TMtxVec; XIndex: Integer; const xScale: TCplx; const Y: TMtxVec; YIndex: Integer; const yScale: TCplx; const Z: TCplx; Index: Integer; Len: Integer): TMtxVec;
2function AddScaledC(const X: TMtxVec; const Y: TMtxVec; const yScale: TCplx; const Z: TCplx): TMtxVec;self = X + Y*yScale + zScalar
└ indexed: function AddScaledC(const X: TMtxVec; XIndex: Integer; const Y: TMtxVec; YIndex: Integer; const yScale: TCplx; const Z: TCplx; Index: Integer; Len: Integer): TMtxVec;
3function AddScaledC(const X: TMtxVec; const Y: TMtxVec; const yScale: Double; const Z: Double): TMtxVec;self = X + Y*yScale + zScalar
└ indexed: function AddScaledC(const X: TMtxVec; XIndex: Integer; const Y: TMtxVec; YIndex: Integer; const yScale: Double; const Z: Double; Index: Integer; Len: Integer): TMtxVec;
4function AddScaledC(const X: TMtxVec; const xScale: Double; const Y: TMtxVec; const yScale: Double; const Z: Double): TMtxVec;self = X*xScale + Y*yScale + zScalar
└ indexed: function AddScaledC(const X: TMtxVec; XIndex: Integer; const xScale: Double; const Y: TMtxVec; YIndex: Integer; const yScale: Double; const Z: Double; Index: Integer; Len: Integer): TMtxVec;

Overload 1: function AddScaledC(const X: TMtxVec; const xScale: TCplx; const Y: TMtxVec; const yScale: TCplx; const Z: TCplx): TMtxVec;

Compute X*xScale + Y*yScale + zScalar

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

Result: stored in self (calling object), returns self for chaining

Indexed: function AddScaledC(const X: TMtxVec; XIndex: Integer; const xScale: TCplx; const Y: TMtxVec; YIndex: Integer; const yScale: TCplx; const Z: TCplx; Index: Integer; Len: Integer): TMtxVec;

Compute X*xScale + Y*yScale + z on sub arrays

#NameTypeDescription
1XTMtxVec
2XIndexIntegerX start index
3xScaleTCplx
4YTMtxVec
5YIndexIntegerY start index
6yScaleTCplx
7ZTCplx
8IndexIntegerstart index
9LenIntegerelement count

Result: stored in self (calling object), returns self for chaining

Overload 2: function AddScaledC(const X: TMtxVec; const Y: TMtxVec; const yScale: TCplx; const Z: TCplx): TMtxVec;

Compute X + Y*yScale + zScalar

#NameTypeDescription
1XTMtxVec
2YTMtxVec
3yScaleTCplx
4ZTCplx

Result: stored in self (calling object), returns self for chaining

Examples
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 := AddScaledC(X, Y, yScale, zScalar);
    A3.AddScaledC(X, Y, yScale, zScalar);
    if not A2.IsEqual(A1) then ERaise('Problem');
    if not A3.IsEqual(A1) then ERaise('Problem');
end;

Indexed: function AddScaledC(const X: TMtxVec; XIndex: Integer; const Y: TMtxVec; YIndex: Integer; const yScale: TCplx; const Z: TCplx; Index: Integer; Len: Integer): TMtxVec;

Compute X + Y*yScale + zScalar on sub arrays

#NameTypeDescription
1XTMtxVec
2XIndexIntegerX start index
3YTMtxVec
4YIndexIntegerY start index
5yScaleTCplx
6ZTCplx
7IndexIntegerstart index
8LenIntegerelement count

Result: stored in self (calling object), returns self for chaining

Overload 3: function AddScaledC(const X: TMtxVec; const Y: TMtxVec; const yScale: Double; const Z: Double): TMtxVec;

Compute X + Y*yScale + zScalar

#NameTypeDescription
1XTMtxVec
2YTMtxVec
3yScaleDouble
4ZDouble

Result: stored in self (calling object), returns self for chaining

Examples
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 := AddScaledC(X, xScale, Y, yScale, zScalar);
    A3.AddScaledC(X, xScale, Y, yScale, zScalar);
    if not A2.IsEqual(A1) then ERaise('Problem');
    if not A3.IsEqual(A1) then ERaise('Problem');
end;

Indexed: function AddScaledC(const X: TMtxVec; XIndex: Integer; const Y: TMtxVec; YIndex: Integer; const yScale: Double; const Z: Double; Index: Integer; Len: Integer): TMtxVec;

Compute X + Y*yScale + zScalar on sub arrays

#NameTypeDescription
1XTMtxVec
2XIndexIntegerX start index
3YTMtxVec
4YIndexIntegerY start index
5yScaleDouble
6ZDouble
7IndexIntegerstart index
8LenIntegerelement count

Result: stored in self (calling object), returns self for chaining

Overload 4: function AddScaledC(const X: TMtxVec; const xScale: Double; const Y: TMtxVec; const yScale: Double; const Z: Double): TMtxVec;

Compute X*xScale + Y*yScale + zScalar

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

Result: stored in self (calling object), returns self for chaining

Indexed: function AddScaledC(const X: TMtxVec; XIndex: Integer; const xScale: Double; const Y: TMtxVec; YIndex: Integer; const yScale: Double; const Z: Double; Index: Integer; Len: Integer): TMtxVec;

Compute X*xScale + Y*yScale + z on sub arrays

#NameTypeDescription
1XTMtxVec
2XIndexIntegerX start index
3xScaleDouble
4YTMtxVec
5YIndexIntegerY start index
6yScaleDouble
7ZDouble
8IndexIntegerstart index
9LenIntegerelement count

Result: stored in self (calling object), returns self for chaining