Vector.ThresholdGT_LT Method

Overload List

#SignatureDescription
1function ThresholdGT_LT(const Vec: TMtxVec; GTLevel: Double; GTValue: Double; LTLevel: Double; LTValue: Double): TMtxVec;Perform "greater than and less than" threshold operation on all Vec object values and store the results in calling object.
└ indexed: function ThresholdGT_LT(const Vec: TMtxVec; GTLevel: Double; GTValue: Double; LTLevel: Double; LTValue: Double; VecIndex: Integer; Index: Integer; Len: Integer): TMtxVec;
2function ThresholdGT_LT(GTLevel: Double; GTValue: Double; LTLevel: Double; LTValue: Double): TMtxVec;Threshold greater than and less than operation.
└ indexed: function ThresholdGT_LT(GTLevel: Double; GTValue: Double; LTLevel: Double; LTValue: Double; Index: Integer; Len: Integer): TMtxVec;

Overload 1: function ThresholdGT_LT(const Vec: TMtxVec; GTLevel: Double; GTValue: Double; LTLevel: Double; LTValue: Double): TMtxVec;

Perform "greater than and less than" threshold operation on all Vec object values and store the results in calling object.

#NameTypeDescription
1VecTMtxVec
2GTLevelDoublescalar
3GTValueDoublescalar
4LTLevelDoublescalar
5LTValueDoublescalar

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

Remarks:

Size and Vector.Complex properties of the calling object are adjusted automatically. An exception will be raised if Vec object contains complex numbers.

Indexed: function ThresholdGT_LT(const Vec: TMtxVec; GTLevel: Double; GTValue: Double; LTLevel: Double; LTValue: Double; VecIndex: Integer; Index: Integer; Len: Integer): TMtxVec;

Perform "greater than and less than" threshold operation on Vec elements from range [VecIndex]..[VecIndex+Len-1] and store the results in the calling object elements [Index]..[Index+Len-1].

#NameTypeDescription
1VecTMtxVec
2GTLevelDoublescalar
3GTValueDoublescalar
4LTLevelDoublescalar
5LTValueDoublescalar
6VecIndexInteger
7IndexIntegerstart index
8LenIntegerelement count

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

Remarks:

Size and Vector.Complex properties of the calling object must be set explicitly. An exception is raised if Vector.ConditionCheck is true and array borders are overrun/underrun. An exception will be raised if Vec object or the calling object contain complex numbers.

Overload 2: function ThresholdGT_LT(GTLevel: Double; GTValue: Double; LTLevel: Double; LTValue: Double): TMtxVec;

Threshold greater than and less than operation.

#NameTypeDescription
1GTLevelDoublescalar
2GTValueDoublescalar
3LTLevelDoublescalar
4LTValueDoublescalar

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

Remarks:

Perform operation on all calling object values. The LTValue parameter is an lower bound for threshold operation. The GTValue parameter is an upper bound for threshold operation. All values less than LTLevel will be replaced with LTValue. All values bigger than GTLevel will be replaced with GTValue. Operation is available only for none Complex values.

Examples
var a: Vector;
begin
    a.SetIt(True,[2,0.1,3,4]);
    a.ThresholdGT_LT(2.3,3.4,1,0.5); // a = [2,0.5,3.4,3.4]
end;
See Also: Vector.ThresholdLT, Vector.ThresholdGT

Indexed: function ThresholdGT_LT(GTLevel: Double; GTValue: Double; LTLevel: Double; LTValue: Double; Index: Integer; Len: Integer): TMtxVec;

Perform "greater than and less than" threshold operation on the calling object values in range [Index]..[Index+Len-1].

#NameTypeDescription
1GTLevelDoublescalar
2GTValueDoublescalar
3LTLevelDoublescalar
4LTValueDoublescalar
5IndexIntegerstart index
6LenIntegerelement count

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

Remarks:

An exception is raised if array borders are overrun/underrun. An exception will be raised if the calling object contains complex numbers.