Overload List
| # | Signature | Description |
|---|---|---|
| 1 | function 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; | ||
| 2 | function AddScaledSqr(const X: TMtxVecInt; const xScale: Integer; const Y: TMtxVecInt; const yScale: Integer): TMtxVecInt; | self = sqr(X*xScale + Y*yScale) |
| 3 | function 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)
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TMtxVecInt | source TVecInt or TMtxInt |
| 2 | Y | TMtxVecInt | source TVecInt or TMtxInt |
| 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 - 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
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TMtxVecInt | source TVecInt or TMtxInt |
| 2 | XIndex | Integer | X start index |
| 3 | Y | TMtxVecInt | source TVecInt or TMtxInt |
| 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 AddScaledSqr(const X: TMtxVecInt; const xScale: Integer; const Y: TMtxVecInt; const yScale: Integer): TMtxVecInt;
Compute sqr(X*xScale + Y*yScale)
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TMtxVecInt | source TVecInt or TMtxInt |
| 2 | xScale | Integer | |
| 3 | Y | TMtxVecInt | source TVecInt or TMtxInt |
| 4 | yScale | Integer |
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
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TMtxVecInt | source TVecInt or TMtxInt |
| 2 | XIndex | Integer | X start index |
| 3 | xScale | Integer | |
| 4 | Y | TMtxVecInt | source TVecInt or TMtxInt |
| 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