Tests if single precision vector is monotonically increasing
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=4), | intent(in), | DIMENSION( N ) | :: | x | ||
integer, | intent(in) | :: | N |
FUNCTION monotonic_sngl( x, N ) !! Tests if single precision vector is monotonically increasing LOGICAL :: monotonic_sngl INTEGER, INTENT( IN ) :: N REAL (KIND=4), DIMENSION( N ), INTENT( IN ) :: x monotonic_sngl = .TRUE. IF ( N == 1 ) RETURN IF ( ANY( x( 2 : N ) <= x( 1 : N - 1 ) ) ) monotonic_sngl = .FALSE. END FUNCTION monotonic_sngl