MatrixInt.ThreshTop Method

Overload List

#SignatureDescription
1function ThreshTop(const Src: TMtxVecInt; const Value: Integer): TMtxVecInt;Perform threshold operation on all Src object values.
└ indexed: function ThreshTop(const Vec: TMtxVecInt; const Value: Integer; VecIndex: Integer; Index: Integer; Len: Integer): TMtxVecInt;
2function ThreshTop(const Value: Integer): TMtxVecInt;Threshold top operation.
└ indexed: function ThreshTop(const Value: Integer; Index: Integer; Len: Integer): TMtxVecInt;

Overload 1: function ThreshTop(const Src: TMtxVecInt; const Value: Integer): TMtxVecInt;

Perform threshold operation on all Src object values.

#NameTypeDescription
1SrcTMtxVecInt
2ValueInteger

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

Remarks:

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

Indexed: function ThreshTop(const Vec: TMtxVecInt; const Value: Integer; VecIndex: Integer; Index: Integer; Len: Integer): TMtxVecInt;

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

#NameTypeDescription
1VecTMtxVecInt
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 VectorInt.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 ThreshTop(const Value: Integer): TMtxVecInt;

Threshold top 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 an upper bound for threshold operation. All values bigger than Value will be replaced with Value.

Examples
var
    a: TMtxInt;
begin
MtxVecInt.CreateIt(out a);
try
a.SetIt(2,2,new int[] {2, 0, 3, 4});
a.ThreshTop(1); // a = [1, 0, 1, 1]
finally
FreeIt(a);
end;
end;
See Also: MatrixInt.ThreshTop

Indexed: function ThreshTop(const Value: Integer; Index: Integer; Len: Integer): TMtxVecInt;

Perfrom 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.