segment_equivalent Function

private pure elemental function segment_equivalent(a, b) result(res)

Check if the one segment is exactly equal to another segment.

This function determines wheter the segment a is equivalent to the segment b, meaning both their min and max values are identical.

Arguments

Type IntentOptional Attributes Name
type(segment_t), intent(in) :: a
type(segment_t), intent(in) :: b

Return Value logical


Source Code

   pure elemental function segment_equivalent(a, b) result(res)
      implicit none
      type(segment_t), intent(in) :: a, b
      logical :: res

      res = a%max == b%max .and. a%min == b%min
   end function segment_equivalent