TMtxVecIntHelper.FindIndexes Method

Overload List

#SignatureDescription
1TMtxVecInt FindIndexes(TMtxVecInt aThis, TMtxVec a, String op, TCplx b)Fills the calling vector with indexes, where the logical expression is true.
2TMtxVecInt FindIndexes(TMtxVecInt aThis, TMtxVec a, String op, TMtxVec b)The b parameter is of Dew.Math.TMtxVec type.
3TMtxVecInt FindIndexes(TMtxVecInt aThis, TMtxVec a, String op, Double b)The b parameter is of double type.

Overload 1: TMtxVecInt FindIndexes(TMtxVecInt aThis, TMtxVec a, String op, TCplx b)

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

#NameTypeDescription
1aThisTMtxVecIntsource TVecInt or TMtxInt
2aTMtxVecsource TVec or TMtx
3opString
4bTCplxscalar

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

Remarks:

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.

Examples
MtxVec.CreateIt(out a, out 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
    {
        MtxVec.FreeIt(ref a, ref b);
    }
See Also: TVec.GatherSplit, TVec.FindAndGather, TMtxVecIntHelper.FindMask, MtxVec.Find, TVec.Gather, TMtxVec.Scatter

Overload 2: TMtxVecInt FindIndexes(TMtxVecInt aThis, TMtxVec a, String op, TMtxVec b)

The b parameter is of Dew.Math.TMtxVec type.

#NameTypeDescription
1aThisTMtxVecIntsource TVecInt or TMtxInt
2aTMtxVecsource TVec or TMtx
3opString
4bTMtxVecsource TVec or TMtx

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

Overload 3: TMtxVecInt FindIndexes(TMtxVecInt aThis, TMtxVec a, String op, Double b)

The b parameter is of double type.

#NameTypeDescription
1aThisTMtxVecIntsource TVecInt or TMtxInt
2aTMtxVecsource TVec or TMtx
3opString
4bDoublescalar

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