Overload List
| # | Signature | Description |
|---|---|---|
| 1 | TMtxVecInt ThreshTop(TMtxVecInt Src, Int32 Value) | Perform threshold operation on all Src object values. |
| └ indexed: TMtxVecInt ThreshTop(TMtxVecInt Vec, Int32 Value, Int32 VecIndex, Int32 Index, Int32 Len) | ||
| 2 | TMtxVecInt ThreshTop(Int32 Value) | Threshold top operation. |
| └ indexed: TMtxVecInt ThreshTop(Int32 Value, Int32 Index, Int32 Len) |
Overload 1: TMtxVecInt ThreshTop(TMtxVecInt Src, Int32 Value)
Perform threshold operation on all Src object values.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Src | TMtxVecInt | source TVecInt or TMtxInt |
| 2 | Value | Int32 |
Result: stored in self (calling object), returns self for chaining
Store the results in calling object. Size and Dew.Math.TMtxVecInt.IntPrecision properties of the calling object are adjusted automatically.
Indexed: TMtxVecInt ThreshTop(TMtxVecInt Vec, Int32 Value, Int32 VecIndex, Int32 Index, Int32 Len)
Perform a threshold operation Vec elements [VecIndex]..[VecIndex+Len-1].
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Vec | TMtxVecInt | source TVecInt or TMtxInt |
| 2 | Value | Int32 | |
| 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 results in the calling object elements [Index]..[Index+Len-1]. Size and Dew.Math.TMtxVecInt.IntPrecision properties of the calling object must be set explicitly. An exception is raised if Dew.Math.TMtxVecBase.ConditionCheck is true and array borders are overrun/underrun.
Overload 2: TMtxVecInt ThreshTop(Int32 Value)
Threshold top operation.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Value | Int32 |
Result: stored in self (calling object), returns self for chaining
Perform threshold operation on all calling object values. The Value parameter is an upper bound for threshold operation. All values bigger than Value will be replaced with Value.
using Dew.Math;
using Dew.Math.Units;
namespace Dew.Examples
{
void Example()
{
TMtxInt a;
MtxVecInt.CreateIt(out a);
try
{
a.SetIt(2,2,new int[] {2, 0, 3, 4});
a.ThreshTop(1); // a = [1, 0, 1, 1]
}
finally
{
MtxVec.FreeIt(ref a);
}
}
}
Indexed: TMtxVecInt ThreshTop(Int32 Value, Int32 Index, Int32 Len)
Perfrom the threshold operation on calling object values [Index]..[Index+Len-1].
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Value | Int32 | |
| 2 | Index | Int32 | start index |
| 3 | Len | Int32 | element count |
Result: stored in self (calling object), returns self for chaining
An exception is raised if array borders are overrun/underrun.