You are here: Symbol Reference > MtxVec Namespace > Classes > TMtxVecIntHelper Class Helper > public > FindIndexes Method > TMtxVecIntHelper.FindIndexes Method (TMtxVec, string, TCplx)
MtxVec VCL
ContentsIndex
PreviousUpNext
TMtxVecIntHelper.FindIndexes Method (TMtxVec, string, TCplx)

Fills the calling vector with indexes, where the logical expression is true.

Pascal
function FindIndexes(const a: TMtxVec; const op: string; const b: TCplx): TMtxVecInt; overload;

Fills the calling vector with indexes, where the Op comparison between a and b is True. Op string parameter can be '<', '>', '>=','<=','=' or '<>'. The calling vector will be sized to match a.Length. On return it will be subranged to reflect actual number of matching elements. The method will not raise an exception, if the calling vector (Self) is already subranged. Check the TVec.SetSubRange routine to learn more about subranges.

Ensure that the power function will return 0, if the exponent is 0.

CreateIt(a,b); With TVec(Self) do try Ln(Base); //First do it the normal way then fix the anomalies Mul(Exponent); Exp; a.FindIndexes(Exponent,'=',0); b.Size(a.Length,Complex); b.Setval(1); Scatter(b,a); finally FreeIt(a,b); end;
Examples on GitHub
Copyright (c) 1999-2025 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!