Find indices to min/max values and also to return the number of missing values in the given range.
uint ocmath_i_minmax( const int * pData, uint i1, uint i2, const int * pMissing, uint * pnmin = NULL, uint * pnmax = NULL )
number of missing values. If all values in range are missing values, then return (i2-i1+1). If none are missing values then returns 0
EX1
void ocmath_i_minmax_Ex1() { vector<float> v = {1,2,3,4,5,2,3,4,54,3,3,4,3,3}; v[7] = -1.23e-123; uint i1 = 2, i2 = v.GetSize() - 1; float dNam =-1.23e-123; uint nMin,nMax; uint nMissingValues = ocmath_f_minmax(v, i1, i2, &dNam, &nMin, &nMax); printf("%d %d %d\n",nMissingValues,nMin,nMax); //nMissingValues=1 nMin=5 nMax=8 }
Find indices to min/max values and also to return the number of missing values in the given range
Data types supported:
ocmath_d_minmax, ocmath_b_minmax, ocmath_us_minmax, ocmath_z_minmax
origin.h