TMtxInt.ThresholdGT_LT Method

Overload List

#SignatureDescription
1TMtxVecInt ThresholdGT_LT(Int32 GTLevel, Int32 GTValue, Int32 LTLevel, Int32 LTValue)Threshold greater than and less than operation.
└ indexed: TMtxVecInt ThresholdGT_LT(Int32 GTLevel, Int32 GTValue, Int32 LTLevel, Int32 LTValue, Int32 Index, Int32 Len)
2TMtxVecInt ThresholdGT_LT(TMtxVecInt Vec, Int32 GTLevel, Int32 GTValue, Int32 LTLevel, Int32 LTValue)Perform "greater than and less than" threshold operation on all Vec object values.
3TMtxVecInt ThresholdGT_LT(TMtxVecInt Vec, Int32 GTLevel, Int32 GTValue, Int32 LTLevel, Int32 LTValue, Int32 VecIndex, Int32 Index, Int32 Len)Perform "greater than and less than" threshold operation on Vec elements from range [VecIndex]..[VecIndex+Len-1].

Overload 1: TMtxVecInt ThresholdGT_LT(Int32 GTLevel, Int32 GTValue, Int32 LTLevel, Int32 LTValue)

Threshold greater than and less than operation.

#NameTypeDescription
1GTLevelInt32
2GTValueInt32
3LTLevelInt32
4LTValueInt32

Result: stored in self (calling object), returns self for chaining

Remarks:

Perform operation on all calling object values. The LTValue parameter is an lower bound for threshold operation. The GTValue parameter is an upper bound for threshold operation. All values less than LTLevel will be replaced with LTValue. All values bigger than GTLevel will be replaced with GTValue.

Examples
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[] {20,1,30,40});
            a.ThresholdGT_LT(23,34,10,5); // a = [20,5,34,34]
        }
        finally
        {
            MtxVecInt.FreeIt(ref a);
        }
    }
}

Indexed: TMtxVecInt ThresholdGT_LT(Int32 GTLevel, Int32 GTValue, Int32 LTLevel, Int32 LTValue, Int32 Index, Int32 Len)

Perfrom "greater than and less than" threshold operation on the calling object values in range [Index]..[Index+Len-1].

#NameTypeDescription
1GTLevelInt32
2GTValueInt32
3LTLevelInt32
4LTValueInt32
5IndexInt32start index
6LenInt32element count

Result: stored in self (calling object), returns self for chaining

Remarks:

An exception is raised if array borders are overrun/underrun.

Overload 2: TMtxVecInt ThresholdGT_LT(TMtxVecInt Vec, Int32 GTLevel, Int32 GTValue, Int32 LTLevel, Int32 LTValue)

Perform "greater than and less than" threshold operation on all Vec object values.

#NameTypeDescription
1VecTMtxVecIntsource TVecInt or TMtxInt
2GTLevelInt32
3GTValueInt32
4LTLevelInt32
5LTValueInt32

Result: stored in self (calling object), returns self for chaining

Remarks:

Store the results in calling object. Size of the calling object is adjusted automatically.

Overload 3: TMtxVecInt ThresholdGT_LT(TMtxVecInt Vec, Int32 GTLevel, Int32 GTValue, Int32 LTLevel, Int32 LTValue, Int32 VecIndex, Int32 Index, Int32 Len)

Perform "greater than and less than" threshold operation on Vec elements from range [VecIndex]..[VecIndex+Len-1].

#NameTypeDescription
1VecTMtxVecIntsource TVecInt or TMtxInt
2GTLevelInt32
3GTValueInt32
4LTLevelInt32
5LTValueInt32
6VecIndexInt32
7IndexInt32start index
8LenInt32element count

Result: stored in self (calling object), returns self for chaining

Remarks:

Store the results in the calling object elements [Index]..[Index+Len-1]. Size 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.