clVector::ThreshTop Method

Overload List

#SignatureDescription
1TOpenCLMtxVec *ThreshTop(double Value) const;Threshold top operation.
2TOpenCLMtxVec *ThreshTop(double Value, int Index, int Len) const;Perfrom the threshold operation on calling object values [Index]..[Index+Len-1].
3TOpenCLMtxVec *ThreshTop(TOpenCLMtxVec *Src, double Value) const;Perform threshold operation on all Src object values.
4TOpenCLMtxVec *ThreshTop(TOpenCLMtxVec *Vec, double Value, int VecIndex, int Index, int Len) const;Perform a threshold operation Vec elements [VecIndex]..[VecIndex+Len-1].

Overload 1: TOpenCLMtxVec *ThreshTop(double Value) const;

Threshold top operation.

#NameTypeDescription
1Valuedouble
Remarks:

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.

Examples
#include "clMtxExpr.h"

using namespace Dew;
using namespace Dew::Math;

void Example()
{
    clVector a;

    a.CopyFromArray(DewArray<float>{2, 0.1, 3, 4});
    a.ThreshTop(0.2); // a = [0.2,0.1,0.2,0.2]
}
See Also: clVector::ThreshTop
Declared in Dew::Math::clVector · Dew.Math/clMtxExpr.h · Cross-compiler

Overload 2: TOpenCLMtxVec *ThreshTop(double Value, int Index, int Len) const;

Perfrom the threshold operation on calling object values [Index]..[Index+Len-1].

#NameTypeDescription
1Valuedouble
2Indexint
3Lenint
Remarks:

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

Declared in Dew::Math::clVector · Dew.Math/clMtxExpr.h · Cross-compiler

Overload 3: TOpenCLMtxVec *ThreshTop(TOpenCLMtxVec *Src, double Value) const;

Perform threshold operation on all Src object values.

#NameTypeDescription
1SrcTOpenCLMtxVec *
2Valuedouble
Remarks:

Store the results in calling object. Size and clVector::Complex properties of the calling object are adjusted automatically.

Declared in Dew::Math::clVector · Dew.Math/clMtxExpr.h · Cross-compiler

Overload 4: TOpenCLMtxVec *ThreshTop(TOpenCLMtxVec *Vec, double Value, int VecIndex, int Index, int Len) const;

Perform a threshold operation Vec elements [VecIndex]..[VecIndex+Len-1].

#NameTypeDescription
1VecTOpenCLMtxVec *
2Valuedouble
3VecIndexint
4Indexint
5Lenint
Remarks:

Store the results in the calling object elements [Index]..[Index+Len-1]. Size and clVector::Complex properties of the calling object must be set explicitly. An exception is raised if array borders are overrun/underrun.

Declared in Dew::Math::clVector · Dew.Math/clMtxExpr.h · Cross-compiler