TSparseMtx.Replace Method

Overload List

#SignatureDescription
1function Replace(const SearchValue: TCplx; const ReplaceValue: TCplx; const Tol: Double): TMtxVec;Search and replace a complex value.
└ indexed: function Replace(const SearchValue: TCplx; const ReplaceValue: TCplx; Index: Integer; Len: Integer; const Tol: Double): TMtxVec;
2function Replace(const SearchValue: Double; const ReplaceValue: Double; const Tol: Double): TMtxVec;Search and replace a value.
└ indexed: function Replace(const SearchValue: Double; const ReplaceValue: Double; Index: Integer; Len: Integer; const Tol: Double): TMtxVec;

Overload 1: function Replace(const SearchValue: TCplx; const ReplaceValue: TCplx; const Tol: Double): TMtxVec;

Search and replace a complex value.

#NameTypeDescription
1SearchValueTCplxscalar
2ReplaceValueTCplxscalar
3TolDoublescalar

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

Indexed: function Replace(const SearchValue: TCplx; const ReplaceValue: TCplx; Index: Integer; Len: Integer; const Tol: Double): TMtxVec;

Replaces the SearchValue with a ReplaceValue, where the searchValue is compared with Tol to the calling object elements [Index]..[Index+Len-1].

#NameTypeDescription
1SearchValueTCplxscalar
2ReplaceValueTCplxscalar
3IndexIntegerstart index
4LenIntegerelement count
5TolDoublescalar

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

Remarks:

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

Overload 2: function Replace(const SearchValue: Double; const ReplaceValue: Double; const Tol: Double): TMtxVec;

Search and replace a value.

#NameTypeDescription
1SearchValueDoublescalar
2ReplaceValueDoublescalar
3TolDoublescalar

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

Remarks:

Replaces the SearchValue with a ReplaceValue, where the searchValue is compared with Tol to the values of the calling object.

Indexed: function Replace(const SearchValue: Double; const ReplaceValue: Double; Index: Integer; Len: Integer; const Tol: Double): TMtxVec;

Replaces the SearchValue with a ReplaceValue, where the searchValue is compared with Tol to the calling object elements [Index]..[Index+Len-1].

#NameTypeDescription
1SearchValueDoublescalar
2ReplaceValueDoublescalar
3IndexIntegerstart index
4LenIntegerelement count
5TolDoublescalar

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

Remarks:

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