Overload List
| # | Signature | Description |
|---|---|---|
| 1 | TOpenCLMtxVec Rem(TOpenCLMtxVec X, TOpenCLMtxVec Y) | The Reminder after division X/Y. |
| └ indexed: TOpenCLMtxVec Rem(TOpenCLMtxVec X, TOpenCLMtxVec Y, Int32 XIndex, Int32 YIndex, Int32 Index, Int32 Len) | ||
| 2 | TOpenCLMtxVec Rem(TOpenCLMtxVec X, Double Y) | Calculates reminder after division X/Y. |
| └ indexed: TOpenCLMtxVec Rem(TOpenCLMtxVec X, Double Y, Int32 XIndex, Int32 Index, Int32 Len) |
Overload 1: TOpenCLMtxVec Rem(TOpenCLMtxVec X, TOpenCLMtxVec Y)
The Reminder after division X/Y.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TOpenCLMtxVec | source TOpenCLVector or TOpenCLMatrix |
| 2 | Y | TOpenCLMtxVec | source TOpenCLVector or TOpenCLMatrix |
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 Dew.Math.clVector.Complex properties of the calling vector are set implicitly to match the X object.
clVector a;
clVector b;
clVector c;
a.CopyFromArray(TSingleArray.Create(0,1,10,-1,-10)); // a = new double[] {0, 1, 10, -1, -10};
b.CopyFromArray(TSingleArray.Create(0,1,PI,-1,-PI)); // b = [0, 1, PI, -1, -PI];
c.Rem(a,b); // c = new double[] {0, 0, 0.5752, 0, -0.5752}
Indexed: TOpenCLMtxVec Rem(TOpenCLMtxVec X, TOpenCLMtxVec Y, Int32 XIndex, Int32 YIndex, Int32 Index, Int32 Len)
Calculates reminder after division X/Y.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TOpenCLMtxVec | source TOpenCLVector or TOpenCLMatrix |
| 2 | Y | TOpenCLMtxVec | source TOpenCLVector or TOpenCLMatrix |
| 3 | XIndex | Int32 | X start index |
| 4 | YIndex | Int32 | Y start index |
| 5 | Index | Int32 | start index |
| 6 | Len | Int32 | element count |
Result: stored in self (calling object), returns self for chaining
Calculation uses the following 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]. The results will be saved to the calling vector. X must be a real. An exception will be raised if array borders are overrun.
Overload 2: TOpenCLMtxVec Rem(TOpenCLMtxVec X, Double Y)
Calculates reminder after division X/Y.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TOpenCLMtxVec | source TOpenCLVector or TOpenCLMatrix |
| 2 | Y | Double | scalar |
Result: stored in self (calling object), returns self for chaining
Reminder is calculated by using the following formula:
x[i]-y*Trunc(x[i]/y).
X must be a real. The results will be saved to the calling vector. Size and Dew.Math.clVector.Complex properties of the calling vector are set implicitly to match the X object.
Indexed: TOpenCLMtxVec Rem(TOpenCLMtxVec X, Double Y, Int32 XIndex, Int32 Index, Int32 Len)
Calculates reminder after division X/Y.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TOpenCLMtxVec | source TOpenCLVector or TOpenCLMatrix |
| 2 | Y | Double | scalar |
| 3 | XIndex | Int32 | X start index |
| 4 | Index | Int32 | start index |
| 5 | Len | Int32 | element count |
Result: stored in self (calling object), returns self for chaining
Reminder is calculated by using the following formula:
x[i]-y*Trunc(x[i]/y).
X must be a real. The results will be saved to the calling vector. An exception will be raised if array borders are overrun.