Opened 4 years ago
Closed 4 years ago
#22938 closed defect (fixed)
Polytopes normaliz backend doesn't handle a polytope with a trivial integral hull
Reported by: | tscrim | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-8.0 |
Component: | geometry | Keywords: | |
Cc: | mkoeppe | Merged in: | |
Authors: | Travis Scrimshaw | Reviewers: | Matthias Koeppe |
Report Upstream: | N/A | Work issues: | |
Branch: | aa9f258 (Commits, GitHub, GitLab) | Commit: | aa9f25855b6d72f7010c2f6241f0737d306b7237 |
Dependencies: | Stopgaps: |
Description
Here is an example that is not handled properly:
sage: ieqs = [[1, 2, -1, 0], [0, -1, 2, -1], [0, 0, -1, 2], [0, -1, 0, 0], [0, 0, -1, 0], ....: [0, 0, 0, -1], [-1, -1, -1, -1], [1, 1, 0, 0], [1, 0, 1, 0], [1, 0, 0, 1]] sage: P = Polyhedron(ieqs=ieqs, backend='normaliz') sage: P.bounding_box() ((-3/4, -1/2, -1/4), (-1/2, -1/4, 0)) sage: P.bounding_box(integral_hull=True) (None, None) sage: P.integral_points() --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-17-2abbf2adff15> in <module>() ----> 1 P.integral_points() /home/travis/sage-build/local/lib/python2.7/site-packages/sage/geometry/polyhedron/backend_normaliz.pyc in integral_points(self, threshold) 568 if threshold > 1: 569 box_min, box_max = self.bounding_box(integral_hull=True) --> 570 box_points = prod(max_coord-min_coord+1 for min_coord, max_coord in zip(box_min, box_max)) 571 if box_points<threshold: 572 from sage.geometry.integral_points import rectangular_box_points TypeError: zip argument #1 must support iteration
Change History (3)
comment:1 Changed 4 years ago by
- Branch set to public/geometry/integral_points_empty_hull_normaliz-22938
- Commit set to aa9f25855b6d72f7010c2f6241f0737d306b7237
- Status changed from new to needs_review
comment:2 Changed 4 years ago by
- Reviewers set to Matthias Koeppe
- Status changed from needs_review to positive_review
Thanks for fixing this.
comment:3 Changed 4 years ago by
- Branch changed from public/geometry/integral_points_empty_hull_normaliz-22938 to aa9f25855b6d72f7010c2f6241f0737d306b7237
- Resolution set to fixed
- Status changed from positive_review to closed
Note: See
TracTickets for help on using
tickets.
New commits:
Fixing integral points for a non-empty polytope with trivial integral hull.