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

Add __copy__ method to backend normaliz of Polyhedron #28633

Closed
kliem opened this issue Oct 19, 2019 · 13 comments
Closed

Add __copy__ method to backend normaliz of Polyhedron #28633

kliem opened this issue Oct 19, 2019 · 13 comments

Comments

@kliem
Copy link
Contributor

kliem commented Oct 19, 2019

Currently, when copying a normaliz polyhedron, the _normaliz_cone is not copied appropriately:

sage: p = polytopes.hypercube(7,backend='normaliz')
sage: pcopy = copy(p)
sage: p == pcopy
True
sage: p is pcopy
False
sage: pcone = p._normaliz_cone
sage: pcopycone = pcopy._normaliz_cone
sage: pcone == pcopycone
True
sage: pcone is pcopycone
True

This ticket implements the __copy__ method in the normaliz backend by making use of the method NmzConeCopy of PyNormaliz. This way, a copy of a polyhedron with backend Normaliz contains a true copy of the normaliz cone.

CC: @jplab

Component: geometry

Keywords: polyhedra, normaliz

Author: Jonathan Kliem

Branch: d30c087

Reviewer: Jean-Philippe Labbé, Travis Scrimshaw

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

@kliem kliem added this to the sage-9.0 milestone Oct 19, 2019
@kliem
Copy link
Contributor Author

kliem commented Oct 19, 2019

Commit: ed7bfd2

@kliem
Copy link
Contributor Author

kliem commented Oct 19, 2019

Branch: public/28633

@kliem
Copy link
Contributor Author

kliem commented Oct 19, 2019

New commits:

ed7bfd2polyhedra with backend normaliz make a copy of the cone when copying

@jplab

This comment has been minimized.

@jplab jplab changed the title Make a true copy of normaliz cone Add __copy__ method to backend normaliz of Polyhedron Oct 19, 2019
@jplab

This comment has been minimized.

@jplab
Copy link

jplab commented Oct 25, 2019

comment:5

Optional flags are missing.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 25, 2019

Changed commit from ed7bfd2 to d30c087

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 25, 2019

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

d30c087added `# optional -pynormaliz`

@tscrim
Copy link
Collaborator

tscrim commented Oct 27, 2019

comment:8

LGTM. JP, I added you as a reviewer for comment:5.

@tscrim
Copy link
Collaborator

tscrim commented Oct 27, 2019

Reviewer: Jean-Philippe Labbé, Travis Scrimshaw

@vbraun
Copy link
Member

vbraun commented Oct 28, 2019

Changed branch from public/28633 to d30c087

@jplab
Copy link

jplab commented Oct 29, 2019

comment:10

Replying to @tscrim:

LGTM. JP, I added you as a reviewer for comment:5.

LGTM too.

@jplab
Copy link

jplab commented Oct 29, 2019

Changed commit from d30c087 to none

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

4 participants