New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#720 - add upper bounds #721
Conversation
This is not what you wrote in #720. |
src/Approximations/upper_bounds.jl
Outdated
cap::Intersection{N, <:LazySet, S}; | ||
kwargs...) where {N<:AbstractFloat, S<:AbstractPolytope{N}} | ||
|
||
Return an upper bound ofd the intersection between a compact set and a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ofd
src/Approximations/upper_bounds.jl
Outdated
|
||
- `d` -- direction | ||
- `cap` -- intersection of a compact set and a polytope | ||
- `kwargs` -- additional arguents that are passed to the support function algorithm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
arguents
Hmm what do you think about adding it as: function ρ_upper_bound(d::AbstractVector{N}, cap::Intersection{N}) where {N<:AbstractFloat}
return min(ρ_upper_bound(d, cap.X), ρ_upper_bound(d, cap.Y))
end |
Why |
i don't know, let's change it to real. the problem is that i get (here julia> ρ_upper_bound(rand(2), X ∩ X)
ERROR: MethodError: LazySets.Approximations.ρ_upper_bound(::Array{Float64,1}, ::LazySets.Intersection{Float64,LazySets.HPolygon{Float64},LazySets.HPolygon{Float64}}) is ambiguous. Candid
ates:
ρ_upper_bound(d::AbstractArray{N,1}, cap::LazySets.Intersection{N,S1,S2} where S2<:LazySets.LazySet{N} where S1<:LazySets.LazySet{N}) where N<:AbstractFloat in LazySets.Approximations
at /Users/forets/.julia/v0.6/LazySets/src/Approximations/upper_bounds.jl:73
ρ_upper_bound(d::AbstractArray{N,1}, cap::LazySets.Intersection{N,#s105,S} where #s105<:LazySets.LazySet) where {N<:AbstractFloat, S<:LazySets.AbstractPolytope{N<:AbstractFloat}} in La
zySets.Approximations at /Users/forets/.julia/v0.6/LazySets/src/Approximations/upper_bounds.jl:67
Possible fix, define
ρ_upper_bound(::AbstractArray{N<:AbstractFloat,1}, ::LazySets.Intersection{N<:AbstractFloat,#s105,S<:LazySets.AbstractPolytope{N<:AbstractFloat}} where #s105<:LazySets.LazySet{N<:Abstr
actFloat}) |
it is fixed defining function ρ_upper_bound(d::AbstractVector{N},
cap::Intersection{N, <:LazySet, S}) where {N<:Real, S<:AbstractPolytope{N}}
return min(ρ_upper_bound(d, cap.X), ρ_upper_bound(d, cap.Y))
end |
You have to add |
Closes #720.