Check data monotonic increasing or decreasing with consistant increment or otherwise.
int ocmath_d_get_vector_inc( UINT nPoints, const double * pData, double dTol, double * pBegin, double * pEnd, double * pInc )
return 1 if data monotonic increasing with consistent increment (per dTol)
return -1 of same but decreasing
return 0 if not monotonic at all, returns 2 or -2 if monotonic but not consistent increment
EX1
void ocmath_d_get_vector_inc_ex1() { vector<int> vecData = {1,2,3,4,5,6,7,8,9,10}; int nTol = 1; int begin, end, inc; int nRet = ocmath_i_get_vector_inc(vecData.GetSize(), vecData, nTol, &begin, &end, &inc); }
check data monotonic increasing or decreasing with consistant increment or otherwise.
return 1 if data monotonic increasing with consistent increment (per dTol)
return -1 of same but decreasing
return 0 if not monotonic at all, returns 2 or -2 if monotonic but not consistent increment
Data types supported:
double: ocmath_d_get_vector_inc
int: ocmath_i_get_vector_inc
origin.h