Overload List
| # | Signature | Description |
|---|---|---|
| 1 | function SqrAddScaled(const X: TMtxVecInt; const Y: TMtxVecInt; const yScale: Integer): TMtxVecInt; | self = sqr(X) + sqr(Y)*yScale |
| └ indexed: function SqrAddScaled(const X: TMtxVecInt; XIndex: Integer; const Y: TMtxVecInt; YIndex: Integer; const yScale: Integer; Index: Integer; Len: Integer): TMtxVecInt; | ||
| 2 | function SqrAddScaled(const X: TMtxVecInt; const xScale: Integer; const Y: TMtxVecInt; const yScale: Integer): TMtxVecInt; | self = sqr(X)*xScale + sqr(Y)*yScale |
| 3 | function SqrAddScaled(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 + sqr(Y)*yScale on sub arrays |
Overload 1: function SqrAddScaled(const X: TMtxVecInt; const Y: TMtxVecInt; const yScale: Integer): TMtxVecInt;
Compute sqr(X) + sqr(Y)*yScale
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TMtxVecInt | |
| 2 | Y | TMtxVecInt | |
| 3 | yScale | Integer |
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: TMtxVecInt; XIndex: Integer; const Y: TMtxVecInt; YIndex: Integer; const yScale: Integer; Index: Integer; Len: Integer): TMtxVecInt;
Compute sqr(X) + sqr(Y)*yScale on sub arrays
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TMtxVecInt | |
| 2 | XIndex | Integer | X start index |
| 3 | Y | TMtxVecInt | |
| 4 | YIndex | Integer | Y start index |
| 5 | yScale | Integer | |
| 6 | Index | Integer | start index |
| 7 | Len | Integer | element count |
Result: stored in self (calling object), returns self for chaining
Overload 2: function SqrAddScaled(const X: TMtxVecInt; const xScale: Integer; const Y: TMtxVecInt; const yScale: Integer): TMtxVecInt;
Compute sqr(X)*xScale + sqr(Y)*yScale
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TMtxVecInt | |
| 2 | xScale | Integer | |
| 3 | Y | TMtxVecInt | |
| 4 | yScale | Integer |
Result: stored in self (calling object), returns self for chaining
Overload 3: function SqrAddScaled(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 + sqr(Y)*yScale on sub arrays
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TMtxVecInt | |
| 2 | XIndex | Integer | X start index |
| 3 | xScale | Integer | |
| 4 | Y | TMtxVecInt | |
| 5 | YIndex | Integer | Y start index |
| 6 | yScale | Integer | |
| 7 | Index | Integer | start index |
| 8 | Len | Integer | element count |
Result: stored in self (calling object), returns self for chaining