| 2.1.24.4.29 ocmath_f_minmax
 DescriptionFind indices to min/max values and also to return the number of missing values in the given range.
 Syntaxuint ocmath_f_minmax( const float * pData, uint i1, uint i2, const float * pMissing, uint * pnmin = NULL, uint * pnmax = NULL ) Parameters pData[input] pointer to vector data, i1[input] starting index to search for min max i2[input] ending index (inclusive) to search min max pMissing[input] Think as missing value, can be NULL if no missing values are defined pnmin[output] index to the found min value location pnmax[output] index to the found max value location
 Returnnumber of missing values. If all values in range are missing values, then return (i2-i1+1). If none are missing values then returns 0
 ExamplesEX1
 void    ocmath_f_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             
}RemarkFind indices to min/max values and also to return the number of missing values in the given range
 Data types supported:
 double:			ocmath_d_minmaxfloat: 			ocmath_f_minmaxint:			ocmath_i_minmaxunsigned short: ocmath_us_minmaxunsigned char:	ocmath_b_minmaxcomplex:		ocmath_z_minmax
 See Alsoocmath_d_minmax, ocmath_i_minmax, ocmath_b_minmax, ocmath_us_minmax, ocmath_z_minmax
 Header to Includeorigin.h
 Reference |