Opened 9 years ago
Closed 9 years ago
#14176 closed enhancement (fixed)
Use standard Python operators for intersection of polyhedrons and membership testing
Reported by: | nthiery | Owned by: | mhampton |
---|---|---|---|
Priority: | major | Milestone: | sage-5.8 |
Component: | geometry | Keywords: | |
Cc: | sage-combinat | Merged in: | sage-5.8.beta2 |
Authors: | Nicolas M. Thiéry | Reviewers: | Volker Braun |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
The attached patch enables &
and
in
operators for polyhedrons::
sage: cube = polytopes.n_cube(3) sage: oct = polytopes.cross_polytope(3) sage: cube.intersection(oct*2) A 3-dimensional polyhedron in ZZ^3 defined as the convex hull of 12 vertices sage: cube & oct*2 A 3-dimensional polyhedron in ZZ^3 defined as the convex hull of 12 vertices
sage: P = Polyhedron(vertices=[[1,1],[1,-1],[0,0]]) sage: P.center() in P True sage: [-1,-1] in P False
Attachments (1)
Change History (5)
Changed 9 years ago by
comment:1 Changed 9 years ago by
- Status changed from new to needs_review
comment:2 Changed 9 years ago by
- Reviewers changed from Volker Braun? to Volker Braun
- Status changed from needs_review to positive_review
comment:3 Changed 9 years ago by
Thanks Volker!
comment:4 Changed 9 years ago by
- Merged in set to sage-5.8.beta2
- Resolution set to fixed
- Status changed from positive_review to closed
Note: See
TracTickets for help on using
tickets.
Sounds good to me