segment_is_valid Function

private pure elemental function segment_is_valid(self) result(res)

Checks if a segment is valid.

This function determines whether the segment is valid by ensuring that the min value is less than or equal to the max value.

Type Bound

segment_t

Arguments

Type IntentOptional Attributes Name
class(segment_t), intent(in) :: self

Return Value logical


Source Code

   pure elemental function segment_is_valid(self) result(res)
      implicit none
      class(segment_t), intent(in) :: self
      logical :: res

      res = self%min <= self%max
   end function segment_is_valid