VF_ismonoton VD_ismonoton VE_ismonoton
 Function Test if the elements of a vector are monotonously increasing or decreasing
 Syntax C/C++ #include int VF_ismonoton( fVector X, ui size ); C++ VecObj #include int vector::ismonoton( const vector& X ); Pascal/Delphi uses VFstd; function VF_ismonoton( X:fVector; size:UIntSize ): Integer;
 CUDA function C/C++ #include int cudaVF_ismonoton( int *h_isSorted, fVector d_X, ui size ); int VFcu_ismonoton( fVector h_X, ui size ); CUDA function Pascal/Delphi uses VFstd; function cudaVF_ismonoton( var h_isSorted:Integer; d_X:fVector; size:UIntSize ): IntBool; function VFcu_ismonoton( h_X:fVector; size:UIntSize ): Integer;
 Description The vector X is analyzed. If the elements are in strict descending order, -1 is returned; if they are either constant or in strict ascending order, +1 is returned. Otherwise the return value is 0. If X contains passages that are increasing as well as passages that remain at a constant value, X is regarded as monotonous only if the increasing passage follows the constant passage, but not the other way round. Thus, the series 0, 0, 0, 1, 2, 3 will be accepted as monotonous (return value +1), whereas the series 1, 2, 3, 4, 4, 4 will not (return value 0). Also the initially constant, then falling series 0, 0, 0, -1, -2, -3 will not be regarded as monotonous.
 Error handling none
 Return value +1 in case of monotonous rise, or if all elements are identical, -1 in case of monotonously falling values, 0 if neither of these conditions is fulfilled.