-
-
Notifications
You must be signed in to change notification settings - Fork 568
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
Polyhedron class mistreats empty inputs #17339
Comments
comment:1
For the case with rays but no vertex we follow cdd in implicitly adding the origin as vertex. This is also spelled out in the docs. |
comment:2
There is a difference between |
comment:3
I don't really like to make a distinction between |
comment:4
What we have right now is way worse. Say I write some code which constructs a ton of polytopes from their Vreps (e.g., I have a polygon and I construct all subpolygons from some of its vertices). A few of them have empty vertices lists. Why should they be understood differently from the rest? |
comment:5
The design choice is: nothing specified = empty polyhedron. This is fine with your example, empty vertex list = empty polygon. Unless you mean a non-compact 2-d polyhedron. I agree that there is perhaps too much DWIM but its also very convenient for interactive use. If you just specify a bunch of rays then in 99% of the cases you want a cone, not some rule thumping about missing a vertex. How about separate |
comment:6
Very good idea about the |
comment:7
Replying to @darijgr:
Haven't really thought about it, whatever is convenient for the implementation. |
comment:9
Even if it's not good style to distinguish between So perhaps we should just change the default value of eqns from Then users who want to explicitly pass an empty list of eqns could either pass |
comment:11
I think Python quite often distinguishes between
They are completely different objects in Python. Other languages behave in the same way for their list-like objects and equivalent of I agree that it can be useful to have |
Author: Darij Grinberg, Jonathan Kliem |
Changed branch from public/polytopes/0 to public/17339 |
comment:12
I took the half-backed fix and did some changes that seem to make it work. It seems that fixing this ticket implies a fixing #28654. The verification of the double description for backend New commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
This comment has been minimized.
This comment has been minimized.
comment:15
I propose leaving the following as it is:
|
comment:16
Should we consider that as valid input? Given a single ray, I don't think there is enough information to determine a polyhedron. However, since that is the current behavior, I cannot strictly object to it. I am only with accepting the ticket as-is since it does improve things, but perhaps we can take a quick second look at the current corner case behaviors? |
comment:17
I think if vertices is However, if vertices is |
comment:18
But you cannot infer what the vertices should be from a single ray (or even line). This should be true more generally for any non-full-dimensional polyhedron that cannot specify at least one point inside it. However, as I write that, it seems like a (computationally) hard problem to me to verify this information. Although maybe this is already implicit in how the polyhedron is constructed? |
comment:19
I guess it is just convention, to add a vertex, when rays and lines are given, but no vertex. I don't understand what part is computationally hard. |
comment:20
I was thinking given enough rays, but now I realize that no matter how much affine data you have, you need to specify a vertex. However, what about a mixture of lines and rays. Although I guess it is documented that the origin is added if no vertices are specified, so it is enshrined as the behavior. Thus this point is moot. |
Reviewer: Travis Scrimshaw |
Changed author from Darij Grinberg, Jonathan Kliem to Darij Grinberg, Jonathan Kliem |
comment:21
fixed zero width space in the author name |
Changed branch from public/17339 to |
This should be a one-point polyhedron.
This should be the whole QQ^2.
This is correct, but only because the code misunderstands the empty V-representation as no V-representation given at all.
CC: @vbraun @mkoeppe @tscrim
Component: geometry
Author: Darij Grinberg, Jonathan Kliem
Branch/Commit:
c5bf041
Reviewer: Travis Scrimshaw
Issue created by migration from https://trac.sagemath.org/ticket/17339
The text was updated successfully, but these errors were encountered: