-
Notifications
You must be signed in to change notification settings - Fork 32
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
#1272 - Use eps by default in plots #1303
Conversation
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.
- Why remove the tests for
Rational{Int}
andFloat32
? - Why remove the test for plotting an intersection?
- The same comments as in #1300 - Set plot defaults properly #1304 apply here.
I was planning to put About # the test below also fails if you take X = Ball1([0//1, 0//1], 1//1), but if you take vertices_list(X) works
# so it can be plotted
julia> X = Diagonal([1//1, 1//1]) * Ball1([0//1, 0//1], 1//1)
LinearMap{Rational{Int64},Ball1{Rational{Int64}},Rational{Int64},Diagonal{Rational{Int64},Array{Rational{Int64},1}}}(Rational{Int64}[1//1 0//1; 0//1 1//1], Ball1{Rational{Int64}}(Rational{Int64}[0//1, 0//1], 1//1))
julia> overapproximate(X, 1//10)
ERROR: MethodError: no method matching σ(::Array{Float64,1}, ::LinearMap{Rational{Int64},Ball1{Rational{Int64}},Rational{Int64},Diagonal{Rational{Int64},Array{Rational{Int64},1}}})
Closest candidates are:
σ(::AbstractArray{N<:Real,1}, ::HalfSpace{N<:Real}) where N<:Real at /Users/forets/.julia/dev/LazySets/src/HalfSpace.jl:110
σ(::AbstractArray{N<:Real,1}, ::ZeroSet{N<:Real}) where N<:Real at /Users/forets/.julia/dev/LazySets/src/ZeroSet.jl:98
σ(::AbstractArray{N<:Real,1}, ::AbstractSingleton{N<:Real}) where N<:Real at /Users/forets/.julia/dev/LazySets/src/AbstractSingleton.jl:231
...
Stacktrace:
[1] new_approx(::LinearMap{Rational{Int64},Ball1{Rational{Int64}},Rational{Int64},Diagonal{Rational{Int64},Array{Rational{Int64},1}}}, ::Array{Rational{Int64},1}, ::Array{Rational{Int64},1}, ::Array{Rational{Int64},1}, ::Array{Rational{Int64},1}) at /Users/forets/.julia/dev/LazySets/src/Approximations/iterative_refinement.jl:95
[2] addapproximation!(::LazySets.Approximations.PolygonalOverapproximation{Rational{Int64}}, ::Array{Rational{Int64},1}, ::Array{Rational{Int64},1}, ::Array{Rational{Int64},1}, ::Array{Rational{Int64},1}) at /Users/forets/.julia/dev/LazySets/src/Approximations/iterative_refinement.jl:124
[3] approximate(::LinearMap{Rational{Int64},Ball1{Rational{Int64}},Rational{Int64},Diagonal{Rational{Int64},Array{Rational{Int64},1}}}, ::Rational{Int64}) at /Users/forets/.julia/dev/LazySets/src/Approximations/iterative_refinement.jl:219
[4] overapproximate(::LinearMap{Rational{Int64},Ball1{Rational{Int64}},Rational{Int64},Diagonal{Rational{Int64},Array{Rational{Int64},1}}}, ::Type{HPolygon}, ::Rational{Int64}) at /Users/forets/.julia/dev/LazySets/src/Approximations/overapproximate.jl:51
[5] overapproximate(::LinearMap{Rational{Int64},Ball1{Rational{Int64}},Rational{Int64},Diagonal{Rational{Int64},Array{Rational{Int64},1}}}, ::Rational{Int64}) at /Users/forets/.julia/dev/LazySets/src/Approximations/overapproximate.jl:63
[6] top-level scope at none:0 |
No, but we can just move these tests to the other loop without |
Some of those tests in |
That is why I said we can move those tests to the other loop. |
In |
We could still test whether passing the value works, but I agree. |
Co-Authored-By: mforets <[email protected]>
Co-Authored-By: mforets <[email protected]>
Co-Authored-By: mforets <[email protected]>
Co-Authored-By: mforets <[email protected]>
Co-Authored-By: mforets <[email protected]>
Co-Authored-By: mforets <[email protected]>
Co-Authored-By: mforets <[email protected]>
Co-Authored-By: mforets <[email protected]>
Co-Authored-By: mforets <[email protected]>
Co-Authored-By: mforets <[email protected]>
Co-Authored-By: mforets <[email protected]>
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.
Maybe we should have a global constant (e.g., PLOT_PRECISION
) for 1e-3
. Or even just a variable so it can be set from outside.
Closes #1272.
Closes #578.
Closes #575.
With this change, the manual has to be updated accordingly (in several places passing the epsilon explicitly is no longer needed). We can do this in a follow-up PR -- this is now #1321.