You are here: Symbol Reference > AbstractMtxVecInt Namespace > Classes > TMtxVecInt Class > public > ThreshAbsGT Method > TMtxVecInt.ThreshAbsGT Method (Integer)
MtxVec VCL
ContentsIndex
PreviousUpNext
TMtxVecInt.ThreshAbsGT Method (Integer)

Threshold top and bottom centered around zero.

Pascal
function ThreshAbsGT(const Value: Integer): TMtxVecInt; overload;

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 and all values smaller than -Value will be replaced with -Value. The comparison checks if abs(Values[i]) > Value.

var a: TVecInt; begin CreateIt(a); try a.SetIt([2,-1,3,4]); a.ThreshAbsGT(2); // a = [2,-1,2,2] finally FreeIt(a); end; end;
Examples on GitHub
Copyright (c) 1999-2024 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!