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

Coercion/conversion from Cone and other objects to Polyhedron #14222

Closed
nthiery opened this issue Mar 3, 2013 · 24 comments
Closed

Coercion/conversion from Cone and other objects to Polyhedron #14222

nthiery opened this issue Mar 3, 2013 · 24 comments

Comments

@nthiery
Copy link
Contributor

nthiery commented Mar 3, 2013

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)

CC: @vbraun @mo271 @jplab @yuan-zhou @kliem

Component: geometry

Keywords: cone, polyhedron

Author: Matthias Koeppe

Branch/Commit: 576076a

Reviewer: Jonathan Kliem

Issue created by migration from https://trac.sagemath.org/ticket/14222

@nthiery nthiery added this to the sage-5.11 milestone Mar 3, 2013
@jdemeyer jdemeyer modified the milestones: sage-5.11, sage-5.12 Aug 13, 2013
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.1, sage-6.2 Jan 30, 2014
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.2, sage-6.3 May 6, 2014
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.3, sage-6.4 Aug 10, 2014
@mo271

This comment has been minimized.

@mo271
Copy link
Contributor

mo271 commented Jun 29, 2017

comment:5

the dimension alias is working..;
I remove it from the list.

@jplab

This comment has been minimized.

@jplab
Copy link
Contributor

jplab commented Aug 22, 2017

Changed keywords from none to cone, polyhedron

@jplab

This comment has been minimized.

@mkoeppe

This comment has been minimized.

@mkoeppe mkoeppe modified the milestones: sage-6.4, sage-9.4 Apr 28, 2021
@mkoeppe mkoeppe changed the title Various little enhancements for Polyhedrons Coercion from Cone to Polyhedron Apr 28, 2021
@mkoeppe mkoeppe modified the milestones: sage-9.4, sage-9.5 Jul 19, 2021
@mkoeppe mkoeppe modified the milestones: sage-9.5, sage-9.6 Dec 14, 2021
@mkoeppe mkoeppe modified the milestones: sage-9.6, sage-9.7 Apr 1, 2022
@mkoeppe

This comment has been minimized.

@mkoeppe
Copy link
Contributor

mkoeppe commented Aug 25, 2022

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Aug 25, 2022

Commit: d0ef08f

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Aug 25, 2022

Branch pushed to git repo; I updated commit sha1. New commits:

8a2b4c6RationalPolyhedralCone.intersection: Delegate to Polyhedron if other is not a RationalPolyhedralCone
36bc14dPolyhedronFace.as_polyhedron, {ConvexRationalPolyhedralCone,LatticePolytopeClass,Hyperplane}.polyhedron: Accept and pass on kwds
d0ef08fPolyhedron: If first arg is an object with an 'as_polyhedron' or 'polyhedron' method, call it

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Aug 25, 2022

Branch pushed to git repo; I updated commit sha1. New commits:

859779fPolyhedron: Add examples for conversions

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Aug 25, 2022

Changed commit from d0ef08f to 859779f

@mkoeppe
Copy link
Contributor

mkoeppe commented Aug 25, 2022

Author: Matthias Koeppe

@mkoeppe mkoeppe changed the title Coercion from Cone to Polyhedron Coercion/conversion from Cone and other objects to Polyhedron Aug 25, 2022
@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Aug 26, 2022

Branch pushed to git repo; I updated commit sha1. New commits:

46b5cb7Polyhedron: Allow converting from a given polyhedron

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Aug 26, 2022

Changed commit from 859779f to 46b5cb7

@mkoeppe

This comment has been minimized.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Aug 26, 2022

Branch pushed to git repo; I updated commit sha1. New commits:

16270cbsrc/sage/geometry/cone.py: Fix doctest

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Aug 26, 2022

Changed commit from 46b5cb7 to 16270cb

@mkoeppe mkoeppe modified the milestones: sage-9.7, sage-9.8 Sep 19, 2022
@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Sep 26, 2022

Changed commit from 16270cb to 576076a

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Sep 26, 2022

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

88e7190ConvexRationalPolyhedralCone: Make `__and__` an alias for intersection
40d4965RationalPolyhedralCone.intersection: Delegate to Polyhedron if other is not a RationalPolyhedralCone
fccf307PolyhedronFace.as_polyhedron, {ConvexRationalPolyhedralCone,LatticePolytopeClass,Hyperplane}.polyhedron: Accept and pass on kwds
3624fcePolyhedron: If first arg is an object with an 'as_polyhedron' or 'polyhedron' method, call it
8b3cd6aPolyhedron: Add examples for conversions
0f83724Polyhedron: Allow converting from a given polyhedron
576076asrc/sage/geometry/cone.py: Fix doctest

@kliem
Copy link
Contributor

kliem commented Oct 1, 2022

Reviewer: Jonathan Kliem

@kliem
Copy link
Contributor

kliem commented Oct 1, 2022

comment:23

Nice. LGTM.

@mkoeppe
Copy link
Contributor

mkoeppe commented Oct 1, 2022

comment:25

Thanks!

@vbraun
Copy link
Member

vbraun commented Oct 11, 2022

Changed branch from u/mkoeppe/coercion_from_cone_to_polyhedron to 576076a

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

No branches or pull requests

7 participants