TSparseMtx.Replace Method

Overload List

#SignatureDescription
1function Replace(const SearchValue, ReplaceValue: TCplx; const Tol: double = 0.0001): TMtxVec; overload;Search and replace a complex value.
└ indexed: function Replace(const SearchValue, ReplaceValue: TCplx; Index, Len: integer; const Tol: double = 0.0001): TMtxVec; overload;
2function Replace(const SearchValue, ReplaceValue: TSCplx; const Tol: single = 0.0001): TMtxVec; overload;
└ indexed: function Replace(const SearchValue, ReplaceValue: TSCplx; Index, Len: integer; const Tol: single = 0.0001): TMtxVec; overload;
3function Replace(const SearchValue, ReplaceValue: double; const Tol: double = 0.0001): TMtxVec; overload;Search and replace a value.
└ indexed: function Replace(const SearchValue, ReplaceValue: double; Index, Len: integer; const Tol: double = 0.0001): TMtxVec; overload;
4function Replace(const SearchValue, ReplaceValue: single; const Tol: single = 0.0001): TMtxVec; overload;
└ indexed: function Replace(const SearchValue, ReplaceValue: single; Index, Len: integer; const Tol: single = 0.0001): TMtxVec; overload;

Overload 1: function Replace(const SearchValue, ReplaceValue: TCplx; const Tol: double = 0.0001): TMtxVec; overload;

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, ReplaceValue: TCplx; Index, Len: integer; const Tol: double = 0.0001): TMtxVec; overload;

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, ReplaceValue: TSCplx; const Tol: single = 0.0001): TMtxVec; overload;

#NameTypeDescription
1SearchValueTSCplxscalar
2ReplaceValueTSCplxscalar
3Tolsinglescalar

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

Indexed: function Replace(const SearchValue, ReplaceValue: TSCplx; Index, Len: integer; const Tol: single = 0.0001): TMtxVec; overload;

#NameTypeDescription
1SearchValueTSCplxscalar
2ReplaceValueTSCplxscalar
3Indexintegerstart index
4Lenintegerelement count
5Tolsinglescalar

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

Overload 3: function Replace(const SearchValue, ReplaceValue: double; const Tol: double = 0.0001): TMtxVec; overload;

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, ReplaceValue: double; Index, Len: integer; const Tol: double = 0.0001): TMtxVec; overload;

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.

Overload 4: function Replace(const SearchValue, ReplaceValue: single; const Tol: single = 0.0001): TMtxVec; overload;

#NameTypeDescription
1SearchValuesinglescalar
2ReplaceValuesinglescalar
3Tolsinglescalar

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

Indexed: function Replace(const SearchValue, ReplaceValue: single; Index, Len: integer; const Tol: single = 0.0001): TMtxVec; overload;

#NameTypeDescription
1SearchValuesinglescalar
2ReplaceValuesinglescalar
3Indexintegerstart index
4Lenintegerelement count
5Tolsinglescalar

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