-
-
Notifications
You must be signed in to change notification settings - Fork 405
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trac #14222: Coercion/conversion from Cone and other objects to Polyh…
…edron Mixed intersections between Cones and Polyhedron returning a Polyhedron: {{{ sage: cone = Cone([(1,0), (-1,0), (0,1)]) sage: p = polytopes.hypercube(2) sage: p & cone A 2-dimensional polyhedron in ZZ^2 defined as the convex hull of 3 vertices }}} In a similar direction, we extend the `Polyhedron` constructor so it can take various types as objects as input, for example: {{{ sage: H.<x,y> = HyperplaneArrangements(QQ) sage: h = x + y - 1; h Hyperplane x + y - 1 sage: Polyhedron(h, base_ring=ZZ) A 1-dimensional polyhedron in ZZ^2 defined as the convex hull of 1 vertex and 1 line sage: Polyhedron(h) }}} URL: https://trac.sagemath.org/14222 Reported by: nthiery Ticket author(s): Matthias Koeppe Reviewer(s): Jonathan Kliem
- Loading branch information
Showing
5 changed files
with
130 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters