Matrix.SqrAddScaled Method

Overload List

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

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

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

#NameTypeDescription
1XTMtxVec
2xScaleTCplx
3YTMtxVec
4yScaleTCplx

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

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

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

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

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

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

Compute sqr(X) + sqr(Y)*yScale

#NameTypeDescription
1XTMtxVec
2YTMtxVec
3yScaleTCplx

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

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

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

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

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

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

Compute sqr(X) + sqr(Y)*yScale

#NameTypeDescription
1XTMtxVec
2YTMtxVec
3yScaleDouble

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^2 - Y^2

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

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

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

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

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

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

#NameTypeDescription
1XTMtxVec
2xScaleDouble
3YTMtxVec
4yScaleDouble

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

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

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

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

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