Skip to content
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 1 commit into from
Jan 19, 2019
Merged

#972 - Subset check in polyhedron #975

merged 1 commit into from
Jan 19, 2019

Conversation

schillic
Copy link
Member

@schillic schillic commented Jan 6, 2019

Closes #972.

A unit test currently fails due to #974. This will automatically be resolved by merging #958 first.

@schillic schillic requested a review from mforets January 6, 2019 21:15
@mforets
Copy link
Member

mforets commented Jan 10, 2019

This will automatically be resolved by merging #958 first.

Did you mean #958 or it was a typo? In schillic/416 i still get that tohrep(P) from #974 returns a HPolytope{Float64}.

@schillic
Copy link
Member Author

schillic commented Jan 10, 2019

In schillic/416 i still get that tohrep(P) from #974 returns a HPolytope{Float64}.

Sure, but the failing test here is a Zonotope → HPolytope conversion (this one).

src/is_subset.jl Outdated Show resolved Hide resolved
Copy link
Member

@mforets mforets left a 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>:?

@mforets
Copy link
Member

mforets commented Jan 16, 2019

Strangely enough, works in 1.0 but not in 0.6, if i checkout this branch:

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})

@schillic
Copy link
Member Author

Strangely enough, ⊈ works in 1.0 but not in 0.6

Yeah, meanwhile we have #1033 for that.

@schillic schillic merged commit c2de461 into master Jan 19, 2019
@schillic schillic deleted the schillic/972 branch January 19, 2019 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Subset check in polyhedron
2 participants