Vector.FindAndGather Method

Overload List

#SignatureDescription
1function FindAndGather(const a: TMtxVec; const op: string; const b: TCplx; const Indexes: TVecInt): TVec;Finds and gathers vector elements.
2function FindAndGather(const a: TMtxVec; const op: string; const b: TMtxVec; const Indexes: TVecInt): TVec;The b parameter is of TMtxVec type.
3function FindAndGather(const a: TMtxVec; const op: string; const b: Double; const Indexes: TVecInt): TVec;The b parameter is of double type.

Overload 1: function FindAndGather(const a: TMtxVec; const op: string; const b: TCplx; const Indexes: TVecInt): TVec;

Finds and gathers vector elements.

#NameTypeDescription
1aTMtxVec
2opstring
3bTCplx
4IndexesTVecInt

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

Remarks:

Fills the Indexes vector with indexes, of those elements where the Op comparison between a and b is True. Op string parameter can be '<', '>', '>=','<=','=' or '<>'. The method also copies or "gathers" the matched elements to the calling vector. The Length and complex property of the calling vector are set automatically.

The Indexes vector stores the indexes as Integer in to the memory location occupied by Values array. The memory is typecasted to an array of integers via IValues array property. Other TMtxVec methods can not be used to perform operations on an array of integers unless explicitely specified.

Overload 2: function FindAndGather(const a: TMtxVec; const op: string; const b: TMtxVec; const Indexes: TVecInt): TVec;

The b parameter is of TMtxVec type.

#NameTypeDescription
1aTMtxVec
2opstring
3bTMtxVec
4IndexesTVecInt

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

Overload 3: function FindAndGather(const a: TMtxVec; const op: string; const b: Double; const Indexes: TVecInt): TVec;

The b parameter is of double type.

#NameTypeDescription
1aTMtxVec
2opstring
3bDouble
4IndexesTVecInt

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