-
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
#972 - Subset check in polyhedron #975
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mforets
reviewed
Jan 16, 2019
mforets
reviewed
Jan 16, 2019
mforets
approved these changes
Jan 16, 2019
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.
LGTM.
There is an issue reported by CI that we should fix though:
LazySets.Polytope: Error During Test
Test threw an exception of type MethodError
Expression: BallInf(N[0, 0], N(1.01)) ⊈ P
MethodError: no method matching ⊈(::LazySets.BallInf{Float64}, ::LazySets.HPolytope{Float64})
Stacktrace:
[1] eval_comparison(::Expr, ::Expr) at ./test.jl:198
[2] macro expansion at /home/travis/.julia/v0.6/LazySets/test/unit_Polytope.jl:107 [inlined]
[3] anonymous at ./<missing>:?
[4] include_from_node1(::String) at ./loading.jl:576
[5] include(::String) at ./sysimg.jl:14
[6] macro expansion at /home/travis/.julia/v0.6/LazySets/test/runtests.jl:82 [inlined]
[7] macro expansion at ./test.jl:860 [inlined]
[8] macro expansion at ./util.jl:237 [inlined]
[9] macro expansion at /home/travis/.julia/v0.6/LazySets/test/runtests.jl:82 [inlined]
[10] anonymous at ./<missing>:?
Strangely enough, v.1.0 julia> N = Float64
Float64
julia> P = rand(VPolytope)
VPolytope{Float64}(Array{Float64,1}[[-1.42147, -1.23376], [0.769873, 1.68362], [1.03484, -0.991754], [1.92539, -0.605125], [-1.16005, -0.990606], [0.438257, 0
.598263]])
julia> BallInf(N[0, 0], N(1)) ⊆ P
false
julia> BallInf(N[0, 0], N(1.01)) ⊈ P
true v0.6 julia> using LazySets, Polyhedra
INFO: Recompiling stale cache file /Users/forets/.julia/lib/v0.6/LazySets.ji for module LazySets.
WARNING: Method definition __init__() in module LazySets at /Users/forets/.julia/v0.6/Requires/src/init.jl:9 overwritten at /Users/forets/.julia/v0.6/Requires
/src/init.jl:9.
julia> N = Float64
Float64
julia> P = rand(VPolytope)
LazySets.VPolytope{Float64}(Array{Float64,1}[[0.636787, -0.155192], [-0.116778, -0.27157], [-1.2512, 0.794358]])
julia> BallInf(N[0, 0], N(1)) ⊆ P
false
julia> BallInf(N[0, 0], N(1.01)) ⊈ P
ERROR: MethodError: no method matching ⊈(::LazySets.BallInf{Float64}, ::LazySets.VPolytope{Float64}) |
Yeah, meanwhile we have #1033 for that. |
schillic
force-pushed
the
schillic/972
branch
from
January 19, 2019 07:45
d864d3c
to
1151752
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #972.
A unit test currently fails due to #974. This will automatically be resolved by merging #958 first.