Given a set of function values for increasing abscissa values, we call this unimodal if there are zero or one values that are greater than all of their neighbors. Before checking for modes, the values are scaled to fill [0, 1] and then rounded to four decimal places. This eliminates unwanted detection of tiny differences as modes.
isUnimodal(f)
A logical value indicating if unimodality is satisfied.
A vector of function values for increasing abscissa values.
This function is intended to be called from other functions in the scdensity package. It does not implement any argument checking.