JuliaReach / LazySets.jl

Scalable symbolic-numeric set computations in Julia
https://juliareach.github.io/LazySets.jl/
Other
226 stars 32 forks source link

Inclusion between set unions #1941

Open mforets opened 4 years ago

mforets commented 4 years ago
a = UnionSetArray([rand(HPolygon) for _ in 1:3])
b = UnionSetArray([rand(HPolygon) for _ in 1:3]);
a ⊆ b

MethodError: no method matching length(::UnionSetArray{Float64,HPolygon{Float64}})
Closest candidates are:
  length(!Matched::Core.SimpleVector) at essentials.jl:597
  length(!Matched::Base.MethodList) at reflection.jl:819
  length(!Matched::Core.MethodTable) at reflection.jl:893
  ...

Stacktrace:
 [1] issubset(::UnionSetArray{Float64,HPolygon{Float64}}, ::UnionSetArray{Float64,HPolygon{Float64}}) at ./abstractset.jl:234
 [2] top-level scope at In[171]:3
schillic commented 4 years ago

This is by far the most difficult issue here. I doubt that there is a feasible solution in general. In theory I would take the pairwise intersection and check that their union is again the original set. But an equivalence check with a union seems almost as hard as the original problem. For Intervals this would work, though.

mforets commented 4 years ago

A sufficient condition is easy, we can do that first.