This function takes as input two sequences of GTIs and returns a sequence which contains all overlaps between the input GTIs. The function makes use of the function andRangesPair() (see section 9.5.6) and similar considerations apply.
function andGtis(gtiA, gtiB) result(andedGti) type(IntervalT), intent(in) :: gtiA(:), gtiB(:) type(IntervalT), pointer :: andedGti(:) end function andGtis