TVec.Find Method

Overload List

#SignatureDescription
1Int32 Find(TCplx x)Compare complex value X with all calling object elements.
2Int32 Find(Double x)Finds a match for X in object values.

Overload 1: Int32 Find(TCplx x)

Compare complex value X with all calling object elements.

#NameTypeDescription
1xTCplxscalar

Returns: Int32 - the index of first matched element. If no matching elements are found, the result is -1.

Remarks:

An exception is raised if calling object Dew.Math.TMtxVec.Complex property is false.

Overload 2: Int32 Find(Double x)

Finds a match for X in object values.

#NameTypeDescription
1xDoublescalar

Returns: Int32 - the index of first matched element. If no matching elements are found, the result is -1.

Remarks:

Compare real value X with all calling object elements.

Note
This method also supports the NAN and INF search.

Examples
Vector a;
Integer ind;
a.SetIt(false,new double[] {2,5,1,6});
ind = a.Find(1.0); // returns 2 (the arrays are zero based)