TVecInt.ThreshBottom Method

Overload List

#SignatureDescription
1function ThreshBottom(const Src: TMtxVecInt; const Value: integer): TMtxVecInt; overload;Perform threshold operation on all Src object values.
└ indexed: function ThreshBottom(const Vec: TMtxVecInt; const Value: integer; VecIndex, Index, Len: integer): TMtxVecInt; overload;
2function ThreshBottom(const Value: integer): TMtxVecInt; overload;Threshold bottom operation.
└ indexed: function ThreshBottom(const Value: integer; Index, Len: integer): TMtxVecInt; overload;

Overload 1: function ThreshBottom(const Src: TMtxVecInt; const Value: integer): TMtxVecInt; overload;

Perform threshold operation on all Src object values.

#NameTypeDescription
1SrcTMtxVecIntsource TVecInt or TMtxInt
2Valueinteger

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

Remarks:

Store the results in calling object. Size and TMtxVecInt.IntPrecision properties of the calling object are adjusted automatically.

Indexed: function ThreshBottom(const Vec: TMtxVecInt; const Value: integer; VecIndex, Index, Len: integer): TMtxVecInt; overload;

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

#NameTypeDescription
1VecTMtxVecIntsource TVecInt or TMtxInt
2Valueinteger
3VecIndexinteger
4Indexintegerstart index
5Lenintegerelement 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 and TMtxVecInt.IntPrecision properties of the calling object must be set explicitly. An exception is raised if TMtxVecBase.ConditionCheck is true and array borders are overrun/underrun.

Overload 2: function ThreshBottom(const Value: integer): TMtxVecInt; overload;

Threshold bottom operation.

#NameTypeDescription
1Valueinteger

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

Remarks:

Perform threshold operation on all calling object values. The Value parameter is a lower bound for threshold operation. All values smaller than Value will be replaced with Value.

Examples
var a: VectorInt;
begin
    a := [2,0,3,4];
    a.ThreshBottom(1); // a = [2,1,3,4]
end;

Indexed: function ThreshBottom(const Value: integer; Index, Len: integer): TMtxVecInt; overload;

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

#NameTypeDescription
1Valueinteger
2Indexintegerstart index
3Lenintegerelement count

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

Remarks:

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