TOpenCLValue.ThresholdLT Method

Overload List

#SignatureDescription
1TOpenCLValue ThresholdLT(TOpenCLValue Vec, Double LTLevel, TCplx LTValue)Perform "less than" threshold operation for complex value in Vec.
2TOpenCLValue ThresholdLT(TOpenCLValue Vec, Double LTLevel, Double LTValue)Threshold less than operation.

Overload 1: TOpenCLValue ThresholdLT(TOpenCLValue Vec, Double LTLevel, TCplx LTValue)

Perform "less than" threshold operation for complex value in Vec.

#NameTypeDescription
1VecTOpenCLValuesource TOpenCLValue
2LTLevelDoublescalar
3LTValueTCplxscalar

Returns: TOpenCLValue

Remarks:

Stores the result in the calling object. FloatPrecision and Dew.Math.TOpenCLBase.Complex properties of the calling object are adjusted automatically. If Vec ovalue is not complex, an exception will be raised.

Overload 2: TOpenCLValue ThresholdLT(TOpenCLValue Vec, Double LTLevel, Double LTValue)

Threshold less than operation.

#NameTypeDescription
1VecTOpenCLValuesource TOpenCLValue
2LTLevelDoublescalar
3LTValueDoublescalar

Returns: TOpenCLValue

Remarks:

Perform operation on Vec. The LTValue parameter is an lower bound for threshold operation. Vec value less than LTLevel will be replaced with LTValue. For a complex number the comparison is applied with the norm of the complex value.

Examples
using Dew.Math;
using Dew.Math.Units;

namespace Dew.Examples
{
    void Example()
    {
        TOpenCLValue a, b;
        clMtxVec.CreateIt(out a, out b);
        try
        {
            a.CopyFromArray( new double[] {2, 0.1, 3, 4});
            a.ThresholdLT(b, 2.3,1.5); // a = [1.5]
        }
        finally
        {
            clMtxVec.FreeIt(ref a, ref b);
        }
    }
}
See Also: TOpenCLValue.ThresholdGT, TOpenCLValue.ThresholdGT_LT