The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



IsMonotone


Unit:SDL_openarrays
Class: none
Declaration: [1] function IsMonotone (var Data: TIntArray): boolean;
[2] function IsMonotone (var Data: TDoubleArray): boolean;

The function IsMonotone checks whether the values in the array Data form a monotonic series or not. A monotonic series contains consecutive values which all exhibit either positive or negative differences to their respective predecessor (zero differences are allowed).

Please note that the array has to have a minimum length of three elements, if the array is shorter the function returns always TRUE.


Last Update: 2023-Feb-06