Open
Description
In ApproxFun.jl, I'd like to do function approximation on a square via:
Fun((x,y) -> exp(x*y), (0..1)^2)
Of course, (0..1)^2
has a completely different interpretation in the setting of ValidatedNumerics.jl. Overriding ^
in either package would be type piracy.
My proposal is to add a placeholder type to this package that can be interpreted by other packages however they please:
# in IntervalSets.jl
struct IntervalProduct{NT<:Tuple}
intervals::NT
end
*(a::AbstractInterval, b::AbstractInterval, c::AbstractInterval...) = IntervalProduct(a,b,c...)
Then ApproxFun can override Fun(::Function, d::IntervalProduct)
to interpret d
as a rectangle, while ValidedNumerics.jl can override ValidatedNumerics.Interval(::IntervalProduct)
to interpret it as an interval arithmetic operation.
Metadata
Metadata
Assignees
Labels
No labels