MatrixInt.AddScaledSqr Method

Overload List

#SignatureDescription
1function AddScaledSqr(const X: TMtxVecInt; const Y: TMtxVecInt; const yScale: Integer): TMtxVecInt;self = sqr(X + Y*yScale)
└ indexed: function AddScaledSqr(const X: TMtxVecInt; XIndex: Integer; const Y: TMtxVecInt; YIndex: Integer; const yScale: Integer; Index: Integer; Len: Integer): TMtxVecInt;
2function AddScaledSqr(const X: TMtxVecInt; const xScale: Integer; const Y: TMtxVecInt; const yScale: Integer): TMtxVecInt;self = sqr(X*xScale + Y*yScale)
3function AddScaledSqr(const X: TMtxVecInt; XIndex: Integer; const xScale: Integer; const Y: TMtxVecInt; YIndex: Integer; const yScale: Integer; Index: Integer; Len: Integer): TMtxVecInt;self = sqr(X*xScale + Y*yScale) on sub arrays

Overload 1: function AddScaledSqr(const X: TMtxVecInt; const Y: TMtxVecInt; const yScale: Integer): TMtxVecInt;

Compute sqr(X + Y*yScale)

#NameTypeDescription
1XTMtxVecInt
2YTMtxVecInt
3yScaleInteger

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

Remarks:

By making use of yScale, it is also possible to compute the following (at the same or higher speed):

(X - Y)^2 = X^2 - 2XY +Y^2

Indexed: function AddScaledSqr(const X: TMtxVecInt; XIndex: Integer; const Y: TMtxVecInt; YIndex: Integer; const yScale: Integer; Index: Integer; Len: Integer): TMtxVecInt;

Compute sqr(X + Y*yScale) on sub arrays

#NameTypeDescription
1XTMtxVecInt
2XIndexIntegerX start index
3YTMtxVecInt
4YIndexIntegerY start index
5yScaleInteger
6IndexIntegerstart index
7LenIntegerelement count

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

Overload 2: function AddScaledSqr(const X: TMtxVecInt; const xScale: Integer; const Y: TMtxVecInt; const yScale: Integer): TMtxVecInt;

Compute sqr(X*xScale + Y*yScale)

#NameTypeDescription
1XTMtxVecInt
2xScaleInteger
3YTMtxVecInt
4yScaleInteger

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

Overload 3: function AddScaledSqr(const X: TMtxVecInt; XIndex: Integer; const xScale: Integer; const Y: TMtxVecInt; YIndex: Integer; const yScale: Integer; Index: Integer; Len: Integer): TMtxVecInt;

Compute sqr(X*xScale + Y*yScale) on sub arrays

#NameTypeDescription
1XTMtxVecInt
2XIndexIntegerX start index
3xScaleInteger
4YTMtxVecInt
5YIndexIntegerY start index
6yScaleInteger
7IndexIntegerstart index
8LenIntegerelement count

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