Vector.AddScaledSqr Method

Overload List

#SignatureDescription
1function AddScaledSqr(const X: TMtxVec; const xScale: Double; const Y: TMtxVec; const yScale: Double): TMtxVec; overload;self = sqr(X*xScale + Y*yScale)
2function AddScaledSqr(const X: TMtxVec; const xScale: TCplx; const Y: TMtxVec; const yScale: TCplx): TMtxVec; overload;self = sqr(X*xScale + Y*yScale)
3function AddScaledSqr(const X, Y: TMtxVec; const yScale: Double): TMtxVec; overload;self = sqr(X + Y*yScale)
4function AddScaledSqr(const X, Y: TMtxVec; const yScale: TCplx): TMtxVec; overload;self = sqr(X + Y*yScale)
5function AddScaledSqr(const X: TMtxVec; xIndex: integer; const xScale: Double; const Y: TMtxVec; yIndex: integer; const yScale: Double; Index, Len: integer): TMtxVec; overload;self = sqr(X*xScale + Y*yScale) on sub arrays
6function AddScaledSqr(const X: TMtxVec; xIndex: integer; const xScale: TCplx; const Y: TMtxVec; yIndex: integer; const yScale: TCplx; Index, Len: integer): TMtxVec; overload;self = sqr(X*xScale + Y*yScale) on sub arrays
7function AddScaledSqr(const X: TMtxVec; xIndex: integer; const Y: TMtxVec; yIndex: integer; const yScale: Double; Index, Len: integer): TMtxVec; overload;self = sqr(X + Y*yScale) on sub arrays
8function AddScaledSqr(const X: TMtxVec; xIndex: integer; const Y: TMtxVec; yIndex: integer; const yScale: TCplx; Index, Len: integer): TMtxVec; overload;self = sqr(X + Y*yScale) on sub arrays

Overload 1: function AddScaledSqr(const X: TMtxVec; const xScale: Double; const Y: TMtxVec; const yScale: Double): TMtxVec; overload;

Compute sqr(X*xScale + Y*yScale)

#NameTypeDescription
1XTMtxVecsource TVec or TMtx
2xScaleDoublescalar
3YTMtxVecsource TVec or TMtx
4yScaleDoublescalar

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

Overload 2: function AddScaledSqr(const X: TMtxVec; const xScale: TCplx; const Y: TMtxVec; const yScale: TCplx): TMtxVec; overload;

Compute sqr(X*xScale + Y*yScale)

#NameTypeDescription
1XTMtxVecsource TVec or TMtx
2xScaleTCplxscalar
3YTMtxVecsource TVec or TMtx
4yScaleTCplxscalar

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

Overload 3: function AddScaledSqr(const X, Y: TMtxVec; const yScale: Double): TMtxVec; overload;

Compute sqr(X + Y*yScale)

#NameTypeDescription
1XTMtxVecsource TVec or TMtx
2YTMtxVecsource TVec or TMtx
3yScaleDoublescalar

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

Overload 4: function AddScaledSqr(const X, Y: TMtxVec; const yScale: TCplx): TMtxVec; overload;

Compute sqr(X + Y*yScale)

#NameTypeDescription
1XTMtxVecsource TVec or TMtx
2YTMtxVecsource TVec or TMtx
3yScaleTCplxscalar

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

Overload 5: function AddScaledSqr(const X: TMtxVec; xIndex: integer; const xScale: Double; const Y: TMtxVec; yIndex: integer; const yScale: Double; Index, Len: integer): TMtxVec; overload;

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

#NameTypeDescription
1XTMtxVecsource TVec or TMtx
2xIndexinteger
3xScaleDoublescalar
4YTMtxVecsource TVec or TMtx
5yIndexinteger
6yScaleDoublescalar
7Indexintegerstart index
8Lenintegerelement count

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

Overload 6: function AddScaledSqr(const X: TMtxVec; xIndex: integer; const xScale: TCplx; const Y: TMtxVec; yIndex: integer; const yScale: TCplx; Index, Len: integer): TMtxVec; overload;

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

#NameTypeDescription
1XTMtxVecsource TVec or TMtx
2xIndexinteger
3xScaleTCplxscalar
4YTMtxVecsource TVec or TMtx
5yIndexinteger
6yScaleTCplxscalar
7Indexintegerstart index
8Lenintegerelement count

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

Overload 7: function AddScaledSqr(const X: TMtxVec; xIndex: integer; const Y: TMtxVec; yIndex: integer; const yScale: Double; Index, Len: integer): TMtxVec; overload;

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

#NameTypeDescription
1XTMtxVecsource TVec or TMtx
2xIndexinteger
3YTMtxVecsource TVec or TMtx
4yIndexinteger
5yScaleDoublescalar
6Indexintegerstart index
7Lenintegerelement count

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

Overload 8: function AddScaledSqr(const X: TMtxVec; xIndex: integer; const Y: TMtxVec; yIndex: integer; const yScale: TCplx; Index, Len: integer): TMtxVec; overload;

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

#NameTypeDescription
1XTMtxVecsource TVec or TMtx
2xIndexinteger
3YTMtxVecsource TVec or TMtx
4yIndexinteger
5yScaleTCplxscalar
6Indexintegerstart index
7Lenintegerelement count

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