JuliaReach/LazySets.jl

Support vector of empty HPolygon returns a value

schillic opened this issue · 0 comments

julia> H = rand(HPolygon)
HPolygon{Float64, Vector{Float64}}(HalfSpace{Float64, Vector{Float64}}[HalfSpace{Float64, Vector{Float64}}
([-0.5141890373325597, 1.3756952703693164], -1.6693690811412345), HalfSpace{Float64, Vector{Float64}}
([-0.2103110083196491, -0.10916173981133498], 0.15288914577433016), HalfSpace{Float64, Vector{Float64}}
([-0.12400282059206358, -0.39972504077185755], 0.5778234315855568), HalfSpace{Float64, Vector{Float64}}
([0.5318388889703878, -0.6570085018357579], 1.264270898534744), HalfSpace{Float64, Vector{Float64}}
([0.3166639772738846, -0.20979998795036603], 0.5629649078533848)])

julia> addconstraint!(H, HalfSpace([0., -1.], 0.5));

julia> isempty(H)
true

julia> @time σ([1., 0], H)
2-element Vector{Float64}:
  1.2943597768037873
 -0.729684469493759