JuliaReach / LazySets.jl

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

constraints_list of Zonotope contains duplicates and NaNs #1244

Closed schillic closed 5 years ago

schillic commented 5 years ago
julia> Z = Zonotope([10.1, -0.05], sparse([1, 2, 1], [1, 3, 4], [0.1, 0.1, 0.1], 2, 4))
Zonotope{Float64}([10.1, -0.05], 
  [1, 1]  =  0.1
  [2, 3]  =  0.1
  [1, 4]  =  0.1)

julia> constraints_list(Z)
8-element Array{HalfSpace{Float64},1}:
 HalfSpace{Float64}([0.0, -1.0], 0.15000000000000002)
 HalfSpace{Float64}([NaN, NaN], NaN)                 
 HalfSpace{Float64}([1.0, -0.0], 10.299999999999999) 
 HalfSpace{Float64}([0.0, -1.0], 0.15000000000000002)
 HalfSpace{Float64}([-0.0, 1.0], 0.04999999999999999)
 HalfSpace{Float64}([NaN, NaN], NaN)                 
 HalfSpace{Float64}([-1.0, 0.0], -9.899999999999999) 
 HalfSpace{Float64}([-0.0, 1.0], 0.04999999999999999)

(Note that this does not use the fallback implementation.)

schillic commented 5 years ago

The second generator is zero, sorry.