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

Add unit tests for d=0 in lazy sets #49

Open
mforets opened this issue Nov 25, 2017 · 3 comments
Open

Add unit tests for d=0 in lazy sets #49

mforets opened this issue Nov 25, 2017 · 3 comments
Labels
robustness 💪 Tests and checks

Comments

@mforets
Copy link
Member

mforets commented Nov 25, 2017

We should review that for d=0 the support vector returns a point in the set, or to consider the special cases that raise an error otherwise.

@mforets mforets changed the title Add unit test for d=0 Add unit tests for d=0 in lazy sets Nov 25, 2017
@schillic schillic added the robustness 💪 Tests and checks label Nov 27, 2017
schillic added a commit that referenced this issue Dec 9, 2017
- turned shorthand function style into `function ... end` blocks (except for constructors)
- renamed `is_contained` -> `∈`
- checked #49
- minor doc fixes
@schillic
Copy link
Member

schillic commented Dec 9, 2017

I reviewed this in #73.

d=0 should work as expected for the following base types:
BallInf, Ballp, HPolygon, HPolygonOpt, VPolygon, Hyperrectangle, Singleton, Zonotope
(and of course for all "operation" types)

For the following types we have to revise:

  • Ball1 uses the center but changes one coordinate to 0. We should guard this change by checking if the direction entry is 0.
  • Ball2 returns the origin. Instead we should return the center.

@mforets: Do you agree with these changes?

For the unit tests it will be helpful to have #68.

schillic added a commit that referenced this issue Dec 10, 2017
- turned shorthand function style into `function ... end` blocks (except for constructors)
- renamed `is_contained` -> `∈`
- checked #49
- minor doc fixes
@schillic schillic added the discussion 🗣️ Requires human input label Jan 5, 2018
@mforets
Copy link
Member Author

mforets commented Apr 1, 2021

In some set operations we specifically say that the results depends on the wrapped sets, e.g.

function ρ(d::AbstractVector, cp::CartesianProduct)

In other cases the check is explicit and an assertion error is returned, e.g. for Bloating,

function ρ(d::AbstractVector, B::Bloating)


In other cases as mentioned in this comment the operation returns a hard-coded value eg. the origin.

@mforets
Copy link
Member Author

mforets commented Apr 1, 2021

I think consistency across different types for this corner case would be nice for the next major release, so I'm adding this to the v2.0 milestone.

@mforets mforets added this to the v2.0 milestone Apr 1, 2021
@schillic schillic removed this from the v2.0 milestone Oct 15, 2022
@schillic schillic removed the discussion 🗣️ Requires human input label Apr 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
robustness 💪 Tests and checks
Projects
None yet
Development

No branches or pull requests

2 participants