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

Support vector of empty HPolygon returns a value #3297

Open
schillic opened this issue Apr 11, 2023 · 0 comments
Open

Support vector of empty HPolygon returns a value #3297

schillic opened this issue Apr 11, 2023 · 0 comments
Labels
fix 🤕 Fix to a problem that is not too serious

Comments

@schillic
Copy link
Member

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
@schillic schillic added the fix 🤕 Fix to a problem that is not too serious label Apr 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix 🤕 Fix to a problem that is not too serious
Projects
None yet
Development

No branches or pull requests

1 participant