Overload List
| # | Signature | Description |
|---|---|---|
| 1 | TMtxVec Divide(TCplx X, TMtxVec Y, TMtxVec Z) | self = xScalar / (Y*Z) |
| └ indexed: TMtxVec Divide(TCplx X, TMtxVec Y, Int32 YIndex, TMtxVec Z, Int32 zIndex, Int32 Index, Int32 Len) | ||
| 2 | TMtxVec Divide(TMtxVec Vec) | Divide each of calling vector elements with corresponding elements in the Vec object. |
| └ indexed: TMtxVec Divide(TMtxVec Vec, Int32 VecIndex, Int32 Index, Int32 Len) | ||
| 3 | TMtxVec Divide(TMtxVec Num, TMtxVec Den) | Divide each of Num elements with corresponding elements in Den. |
| 4 | TMtxVec Divide(TMtxVec X, TMtxVec Y, TMtxVec Z) | self = X / (Y*Z) |
| └ indexed: TMtxVec Divide(TMtxVec X, Int32 XIndex, TMtxVec Y, Int32 YIndex, TMtxVec Z, Int32 zIndex, Int32 Index, Int32 Len) | ||
| 5 | TMtxVec Divide(TMtxVec Vec1, TMtxVec Vec2, Double Threshold) | Divide each of Vec1 elements with corresponding elements in the Vec2 object. |
| └ indexed: TMtxVec Divide(TMtxVec Vec1, TMtxVec Vec2, Double Threshold, Int32 Vec1Index, Int32 Vec2Index, Int32 Index, Int32 Len) | ||
| 6 | TMtxVec Divide(TMtxVec Vec, Double Threshold) | Vector division. |
| └ indexed: TMtxVec Divide(TMtxVec Vec, Double Threshold, Int32 VecIndex, Int32 Index, Int32 Len) | ||
| 7 | TMtxVec Divide(Double X, TMtxVec Y, TMtxVec Z) | self = xScalar / (Y*Z) |
| └ indexed: TMtxVec Divide(Double X, TMtxVec Y, Int32 YIndex, TMtxVec Z, Int32 zIndex, Int32 Index, Int32 Len) | ||
| 8 | TMtxVec Divide(TMtxVec Num, TMtxVec Den, Int32 NumIndex, Int32 DenIndex, Int32 Index, Int32 Len) | Divide [NumIndex]..[NumIndex+Len-1] Num elements with [DenIndex]..[DenIndex+Len-1] elements in Den. |
Overload 1: TMtxVec Divide(TCplx X, TMtxVec Y, TMtxVec Z)
Compute xScalar / (Y*Z)
Result: stored in self (calling object), returns self for chaining
Indexed: TMtxVec Divide(TCplx X, TMtxVec Y, Int32 YIndex, TMtxVec Z, Int32 zIndex, Int32 Index, Int32 Len)
Compute xScalar / (Y*Z) on sub array
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TCplx | scalar |
| 2 | Y | TMtxVec | source TVec or TMtx |
| 3 | YIndex | Int32 | Y start index |
| 4 | Z | TMtxVec | source TVec or TMtx |
| 5 | zIndex | Int32 | |
| 6 | Index | Int32 | start index |
| 7 | Len | Int32 | element count |
Result: stored in self (calling object), returns self for chaining
Overload 2: TMtxVec Divide(TMtxVec Vec)
Divide each of calling vector elements with corresponding elements in the Vec object.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Vec | TMtxVec | source TVec or TMtx |
Result: stored in self (calling object), returns self for chaining
Size and Dew.Math.Vector.Complex property of the calling object are set automatically. The result is stored in the calling object.
Note
The result of division by zero will be the INF constant. Division of zero by zero will result in NAN.
Vector a = new Vector();
a.SetIt(new double[] { 1.0, 2.0, 3.0, 4.0 });
Vector b = new Vector();
b.SetIt(new double[] { 5.0, 6.0, 7.0, 8.0 });
a.Divide(b);
Vector expected = new Vector();
expected.SetIt(new double[] { 0.2, 0.333333333333333, 0.428571428571429, 0.5 });
if (!a.IsEqual(expected, 1e-10, TCompare.cmpAbsolute))
throw new Exception("Vector.Divide: mismatch");
Indexed: TMtxVec Divide(TMtxVec Vec, Int32 VecIndex, Int32 Index, Int32 Len)
Divide calling vector elements [Index]...[Index+Len-1] with corresponding elements [VecIndex]...[VecIndex+Len-1] from the Vec object.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Vec | TMtxVec | source TVec or TMtx |
| 2 | VecIndex | Int32 | |
| 3 | Index | Int32 | start index |
| 4 | Len | Int32 | element count |
Result: stored in self (calling object), returns self for chaining
Store the result in the calling vector. The Dew.Math.Vector.Length of the calling vector is not changed. An exception is raised if Dew.Math.Vector.ConditionCheck is True and array borders are overrun or underrun.
Note
The result of division by zero will be the INF constant. Division of zero by zero will result in NAN.
Overload 3: TMtxVec Divide(TMtxVec Num, TMtxVec Den)
Divide each of Num elements with corresponding elements in Den.
Result: stored in self (calling object), returns self for chaining
Size and Dew.Math.Vector.Complex property of the calling object are set automatically. The result is stored in the calling object.
Note
The result of division by zero will be the INF constant. Division of zero by zero will result in NAN.
Vector a = new Vector();
Vector x = new Vector();
x.SetIt(new double[] { 1.0, 2.0, 3.0, 4.0 });
Vector y = new Vector();
y.SetIt(new double[] { 5.0, 6.0, 7.0, 8.0 });
a.Divide(x, y);
Vector expected = new Vector();
expected.SetIt(new double[] { 0.2, 0.333333333333333, 0.428571428571429, 0.5 });
if (!a.IsEqual(expected, 1e-10, TCompare.cmpAbsolute))
throw new Exception("Vector.Divide: mismatch");
Overload 4: TMtxVec Divide(TMtxVec X, TMtxVec Y, TMtxVec Z)
Compute X / (Y*Z)
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TMtxVec | source TVec or TMtx |
| 2 | Y | TMtxVec | source TVec or TMtx |
| 3 | Z | TMtxVec | source TVec or TMtx |
Result: stored in self (calling object), returns self for chaining
The following expression would also run at the same or higher speed, when passing Y also for the Z parameter:
X / (Y^2)
Indexed: TMtxVec Divide(TMtxVec X, Int32 XIndex, TMtxVec Y, Int32 YIndex, TMtxVec Z, Int32 zIndex, Int32 Index, Int32 Len)
Compute X/( Y*Z ) on sub array
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TMtxVec | source TVec or TMtx |
| 2 | XIndex | Int32 | X start index |
| 3 | Y | TMtxVec | source TVec or TMtx |
| 4 | YIndex | Int32 | Y start index |
| 5 | Z | TMtxVec | source TVec or TMtx |
| 6 | zIndex | Int32 | |
| 7 | Index | Int32 | start index |
| 8 | Len | Int32 | element count |
Result: stored in self (calling object), returns self for chaining
Overload 5: TMtxVec Divide(TMtxVec Vec1, TMtxVec Vec2, Double Threshold)
Divide each of Vec1 elements with corresponding elements in the Vec2 object.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Vec1 | TMtxVec | source TVec or TMtx |
| 2 | Vec2 | TMtxVec | source TVec or TMtx |
| 3 | Threshold | Double | scalar |
Result: stored in self (calling object), returns self for chaining
Store the result in the calling vector.
Indexed: TMtxVec Divide(TMtxVec Vec1, TMtxVec Vec2, Double Threshold, Int32 Vec1Index, Int32 Vec2Index, Int32 Index, Int32 Len)
Divide Vec1 elements [Vec1Index]...[Vec1Index+Len-1] with corresponding elements [Vec2Index]...[Vec2Index+Len-1] from the Vec object.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Vec1 | TMtxVec | source TVec or TMtx |
| 2 | Vec2 | TMtxVec | source TVec or TMtx |
| 3 | Threshold | Double | scalar |
| 4 | Vec1Index | Int32 | |
| 5 | Vec2Index | Int32 | |
| 6 | Index | Int32 | start index |
| 7 | Len | Int32 | element count |
Result: stored in self (calling object), returns self for chaining
Store the result in the calling vector [Index]...[Index+Len-1].
Overload 6: TMtxVec Divide(TMtxVec Vec, Double Threshold)
Vector division.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Vec | TMtxVec | source TVec or TMtx |
| 2 | Threshold | Double | scalar |
Result: stored in self (calling object), returns self for chaining
Divide each of Vec elements with corresponding elements in the calling object. Size and Dew.Math.Vector.Complex property of the calling object are set automatically. The result is stored in the calling object.
The threshold parameter is used to prevent against division by zero and numerical instabilities in the follow on processing. All values of Vec smaller than Threshold will be replaced with Threshold.
Indexed: TMtxVec Divide(TMtxVec Vec, Double Threshold, Int32 VecIndex, Int32 Index, Int32 Len)
Divide each of Vec elements with corresponding elements in the calling object.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Vec | TMtxVec | source TVec or TMtx |
| 2 | Threshold | Double | scalar |
| 3 | VecIndex | Int32 | |
| 4 | Index | Int32 | start index |
| 5 | Len | Int32 | element count |
Result: stored in self (calling object), returns self for chaining
Store the result in the calling object. Size and Dew.Math.Vector.Complex property of the calling object are set automatically.
Overload 7: TMtxVec Divide(Double X, TMtxVec Y, TMtxVec Z)
Compute xScalar / (Y*Z)
Result: stored in self (calling object), returns self for chaining
Indexed: TMtxVec Divide(Double X, TMtxVec Y, Int32 YIndex, TMtxVec Z, Int32 zIndex, Int32 Index, Int32 Len)
Compute xScalar / (Y*Z) on sub array
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | Double | scalar |
| 2 | Y | TMtxVec | source TVec or TMtx |
| 3 | YIndex | Int32 | Y start index |
| 4 | Z | TMtxVec | source TVec or TMtx |
| 5 | zIndex | Int32 | |
| 6 | Index | Int32 | start index |
| 7 | Len | Int32 | element count |
Result: stored in self (calling object), returns self for chaining
Overload 8: TMtxVec Divide(TMtxVec Num, TMtxVec Den, Int32 NumIndex, Int32 DenIndex, Int32 Index, Int32 Len)
Divide [NumIndex]..[NumIndex+Len-1] Num elements with [DenIndex]..[DenIndex+Len-1] elements in Den.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Num | TMtxVec | source TVec or TMtx |
| 2 | Den | TMtxVec | source TVec or TMtx |
| 3 | NumIndex | Int32 | |
| 4 | DenIndex | Int32 | |
| 5 | Index | Int32 | start index |
| 6 | Len | Int32 | element count |
Result: stored in self (calling object), returns self for chaining
Store result in the calling vector at positions [Index]..[Index+Len-1] Dew.Math.Vector.Size and Dew.Math.Vector.Complex property of the calling object are not changed. An exception is raised if Dew.Math.Vector.ConditionCheck is True and array borders are overrun or underrun.
Note
The result of division by zero will be the INF constant. Division of zero by zero will result in NAN.