Overload List
| # | Signature | Description |
|---|---|---|
| 1 | function Rem(const X: TMtxVec; const Y: TMtxVec): TMtxVec; | The Reminder after division X/Y. |
| └ indexed: function Rem(const X: TMtxVec; const Y: TMtxVec; XIndex: Integer; YIndex: Integer; Index: Integer; Len: Integer): TMtxVec; | ||
| 2 | function Rem(const X: TMtxVec; Y: Double): TMtxVec; | Calculates reminder after division X/Y according to formula X[i]-y*Trunc(X[i]/y). |
| └ indexed: function Rem(const X: TMtxVec; Y: Double; XIndex: Integer; Index: Integer; Len: Integer): TMtxVec; |
Overload 1: function Rem(const X: TMtxVec; const Y: TMtxVec): TMtxVec;
The Reminder after division X/Y.
Result: stored in self (calling object), returns self for chaining
Calculates reminder after division according to formula: X[i]-y[i]*Trunc(X[i]/y[i]). The results will be saved to the calling vector. X and Y must be a real and have the same length. Size and Vector.Complex properties of the calling vector are set implicitly to match the X object.
var a,b,c: Vector;
begin
a.SetIt(false,[0,1,10,-1,-10]); // a = [0, 1, 10, -1, -10];
b.SetIt(false,[0,1,PI,-1,-PI]); // b = [0, 1, PI, -1, -PI];
c.Rem(a,b); // c = [0, 0, 0.5752, 0, -0.5752]
end;
Indexed: function Rem(const X: TMtxVec; const Y: TMtxVec; XIndex: Integer; YIndex: Integer; Index: Integer; Len: Integer): TMtxVec;
Calculates reminder after division X/Y according to formula: z[i] = X[xi]-y[yi]*Trunc(X[xi]/y[yi]), where i in [Index..Index+Len], xi in [XIndex..XIndex+Len], yi in [YIndex..YIndex+Len].
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TMtxVec | |
| 2 | Y | TMtxVec | |
| 3 | XIndex | Integer | X start index |
| 4 | YIndex | Integer | Y start index |
| 5 | Index | Integer | start index |
| 6 | Len | Integer | element count |
Result: stored in self (calling object), returns self for chaining
The results will be saved to the calling vector. X must be a real. An exception will be raised if Vector.ConditionCheck is True and array borders are overrun.
Overload 2: function Rem(const X: TMtxVec; Y: Double): TMtxVec;
Calculates reminder after division X/Y according to formula X[i]-y*Trunc(X[i]/y).
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TMtxVec | |
| 2 | Y | Double | scalar |
Result: stored in self (calling object), returns self for chaining
X must be a real. The results will be saved to the calling vector. Size and Vector.Complex properties of the calling vector are set implicitly to match the X object.
Indexed: function Rem(const X: TMtxVec; Y: Double; XIndex: Integer; Index: Integer; Len: Integer): TMtxVec;
Calculates reminder after division X/Y according to formula: z[i] = X[xi]-y*Trunc(X[xi]/y), where i in [Index..Index+Len], xi in [XIndex..XIndex+Len].
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TMtxVec | |
| 2 | Y | Double | scalar |
| 3 | XIndex | Integer | X start index |
| 4 | Index | Integer | start index |
| 5 | Len | Integer | element count |
Result: stored in self (calling object), returns self for chaining
X must be a real. The results will be saved to the calling vector. An exception will be raised if Vector.ConditionCheck is True and array borders are overrun.