Functions vector_is_strictly_monotonic¶
-
template<class
vec_t
>
into2scl
::
vector_is_strictly_monotonic
(size_t n, vec_t &data)¶ Test if the first
n
elements of a vector are strictly monotonic and determine if they are increasing or decreasing.If
n
is zero this function will return 0 without calling the error handler. Also, if the vector is not monotonic, this function will return 0. If the vector is strictly monotonic, then this function will return 1 if it is increasing and 2 if it is decreasing.
-
template<class
vec_t
>
into2scl
::
vector_is_strictly_monotonic
(vec_t &data)¶ Test if the first
n
elements of a vector are strictly monotonic and determine if they are increasing or decreasing.If
n
is zero this function will return 0 without calling the error handler. Also, if the vector is not monotonic, this function will return 0. If the vector is strictly monotonic, then this function will return 1 if it is increasing and 2 if it is decreasing.