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

Containment check #68

Closed
schillic opened this issue Dec 8, 2017 · 7 comments
Closed

Containment check #68

schillic opened this issue Dec 8, 2017 · 7 comments
Assignees
Labels
feature ➕ A new feature
Milestone

Comments

@schillic
Copy link
Member

schillic commented Dec 8, 2017

Add a containment check ∈(x, S) for all sets.

For some we already have is_contained. I prefer in instead (the Julia alias for ).

@schillic schillic added the feature ➕ A new feature label Dec 8, 2017
@schillic schillic mentioned this issue Dec 8, 2017
@mforets
Copy link
Member

mforets commented Dec 8, 2017

where x is a point? for polygons we should check point in polygon algorithms.

agreed for overloading in

@mforets
Copy link
Member

mforets commented Dec 8, 2017

.. still we can use is_contained in the mathematical sense, as for #69

@schillic
Copy link
Member Author

schillic commented Dec 8, 2017

Yes, x is a point. Should it be a Vector or a Singleton?
We can provide a convenience conversion function for the other combination.

@mforets
Copy link
Member

mforets commented Dec 8, 2017

we can implement it with sets, i.e. using Singleton, and also provide the shortcut for x being a Vector.

@schillic
Copy link
Member Author

schillic commented Dec 9, 2017

I thought about it and I think it is more efficient to unwrap a Singleton (which is anyway what has to be done) in one case than to wrap a vector in a Singleton in the other case.
So I want to implement it for AbstractVector and provide a conversion function for Singleton.

Where would we define the conversion function? Inside LazySets.jl? Maybe we should create a new file for general LazySet functions (we already have norm/radius/diameter in box_approximations.jl, so we could move them there as well).

@schillic schillic self-assigned this Dec 9, 2017
schillic added a commit that referenced this issue Dec 9, 2017
@schillic schillic added the discussion 🗣️ Requires human input label Dec 9, 2017
schillic added a commit that referenced this issue Dec 9, 2017
schillic added a commit that referenced this issue Dec 9, 2017
schillic added a commit that referenced this issue Dec 9, 2017
schillic added a commit that referenced this issue Dec 9, 2017
schillic added a commit that referenced this issue Dec 9, 2017
schillic added a commit that referenced this issue Dec 10, 2017
@schillic
Copy link
Member Author

schillic commented Dec 10, 2017

for polygons we should check point in polygon algorithms.

Thanks for this pointer. I will implement the "dot product" solution from the bottom of the page.

The algorithms in this link work for nonconvex polygons, and at the bottom it is said "Simpler algorithms are possible for [...] convex polygons [...]."
We also already have an implementation for HPolygon using support vectors. Not sure if this is "optimal", though.
We can always add better algorithms later, for now I just want one solution.

schillic added a commit that referenced this issue Dec 12, 2017
schillic added a commit that referenced this issue Dec 12, 2017
schillic added a commit that referenced this issue Dec 12, 2017
schillic added a commit that referenced this issue Dec 12, 2017
schillic added a commit that referenced this issue Dec 12, 2017
schillic added a commit that referenced this issue Dec 12, 2017
schillic added a commit that referenced this issue Dec 12, 2017
@mforets mforets added this to the 1.0.0 milestone Dec 12, 2017
schillic added a commit that referenced this issue Dec 12, 2017
schillic added a commit that referenced this issue Dec 12, 2017
@schillic schillic removed the discussion 🗣️ Requires human input label Dec 12, 2017
schillic added a commit that referenced this issue Dec 12, 2017
schillic added a commit that referenced this issue Dec 12, 2017
schillic added a commit that referenced this issue Dec 12, 2017
@schillic
Copy link
Member Author

schillic commented Dec 12, 2017

We are not 100% sure that the Zonotope implementation works in all cases, but keep it for now. @schillic expects it to fail for linearly dependent generators only.

Most types are now supported by #74. Eventually we can continue in #77 with the missing ones.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature ➕ A new feature
Projects
None yet
Development

No branches or pull requests

2 participants