Right now the I and E types (returned from QuadGK) seem undefined in Segment:
# integration segment (a,b), estimated integral I, and estimated error E
struct Segment
a::Number
b::Number
I
E
end
isless(i::Segment, j::Segment) = isless(i.E, j.E)
The problem is that these depend on the return type of the integrand. Some complicated logic is required to handle the case where the integrand is type-unstable if you want to concretely type these fields.
Right now the I and E types (returned from QuadGK) seem undefined in
Segment
:It could be replaced by something like: