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

Merge recipes for polygons and add polytopes #602

Merged
merged 4 commits into from
Sep 3, 2018

Conversation

mforets
Copy link
Member

@mforets mforets commented Sep 2, 2018

Closes #574.

@mforets mforets changed the title merge recipes for polygons and add polytopes Merge recipes for polygons and add polytopes Sep 2, 2018
@schillic
Copy link
Member

schillic commented Sep 2, 2018

Why not just use AbstractPolytope? vertices_list should exist for all types.
If we have more efficient implementations, they will be chosen automatically.
See #574.

@schillic
Copy link
Member

schillic commented Sep 2, 2018

You also need to adapt the unit tests in unit_plot.jl.

@mforets
Copy link
Member Author

mforets commented Sep 2, 2018

Yeah you're right, i agree to plot every AbstractPolytope exactly by default. I think it's more natural than plotting a box overapproximation. If the user wants to plot an overapproximation of the set, plot_lazyset(S::LazySet, ε::Float64) can still be used.

@mforets
Copy link
Member Author

mforets commented Sep 2, 2018

See #574.

Do you agree this closes #574?

@mforets
Copy link
Member Author

mforets commented Sep 2, 2018

You also need to adapt the unit tests in unit_plot.jl.

I had a look, but what is there to change? I wouldn't delete tests even if they are now called from the same recipe. (since for each different type they are testing different code paths)


"""
plot_polygon(P::Union{AbstractPolygon, HPolytope, VPolytope}; ...)
plot_polygon(P::Union{AbstractPolytope}; ...)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

without Union (same below)

@schillic
Copy link
Member

schillic commented Sep 2, 2018

Do you agree this closes #574?

Yes.

You also need to adapt the unit tests in unit_plot.jl.

I had a look, but what is there to change? I wouldn't delete tests even if they are now called from the same recipe. (since for each different type they are testing different code paths)

You may need to replace the @test_throws X plot(y) with just plot(y). Just run the tests locally and see if they pass. I am not sure.

@schillic schillic merged commit ce2cb0d into master Sep 3, 2018
@schillic schillic deleted the mforets/plot_polytopes branch September 3, 2018 06:00
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.

2 participants