You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
julia>using LazySets
julia> B =BallInf(ones(2), 1.0)
LazySets.BallInf{Float64}([1.0, 1.0], 1.0)
julia>low(B)
ERROR: MethodError: no method matching low(::LazySets.BallInf{Float64})
Closest candidates are:low(::LazySets.Hyperrectangle{N<:Real}) where N<:Real at /Users/forets/.julia/v0.6/LazySets/src/Hyperrectangle.jl:187low(::LazySets.Interval) at /Users/forets/.julia/v0.6/LazySets/src/Interval.jl:258
julia>high(B)
ERROR: MethodError: no method matching high(::LazySets.BallInf{Float64})
Closest candidates are:high(::LazySets.Hyperrectangle{N<:Real}) where N<:Real at /Users/forets/.julia/v0.6/LazySets/src/Hyperrectangle.jl:169high(::LazySets.Interval) at /Users/forets/.julia/v0.6/LazySets/src/Interval.jl:273
The text was updated successfully, but these errors were encountered:
Hmm the AbstractHyperrectangle interface already requires that the radius of the hyperrectangle (as a vector, the radius_hyperrectangle) is implemented.
If we also require that each concrete subtype defines the center, then we can define in the interface the fallback functions
functionhigh(H::AbstractHyperrectangle{N})::Vector{N}where {N<:Real}
returncenter(H) .+radius_hyperrectangle(H)
endfunctionlow(H::AbstractHyperrectangle{N})::Vector{N}where {N<:Real}
returncenter(H) .-radius_hyperrectangle(H)
end
The text was updated successfully, but these errors were encountered: