You are here: Symbol Reference > MtxVec Namespace > Classes > TVec Class > public > FindAndGather Method > TVec.FindAndGather Method (TMtxVec, string, TCplx, TVecInt)
MtxVec VCL
ContentsIndex
PreviousUpNext
TVec.FindAndGather Method (TMtxVec, string, TCplx, TVecInt)

Finds and gathers vector elements.

Pascal
function FindAndGather(const a: TMtxVec; const op: string; const b: TCplx; const Indexes: TVecInt = nil): TVec; overload;

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. Both the calling vector and Indexes will be sized to match a.Length. On return, both will be subranged to reflect actual number of matching elements. The method will not raise an exception, if the calling vector (Self) or Indexes parameter are already subranged.

Copyright (c) 1999-2024 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!