Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Merge branch 'public/30891' of git://trac.sagemath.org/sage into publ…
Browse files Browse the repository at this point in the history
…ic/30891-reb
  • Loading branch information
Jonathan Kliem committed Dec 1, 2020
2 parents 020bd59 + cddb6db commit c7ed9b5
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/sage/geometry/polyhedron/backend_normaliz.py
Original file line number Diff line number Diff line change
Expand Up @@ -764,6 +764,15 @@ def _cone_from_Vrepresentation_and_Hrepresentation(self, vertices, rays, lines,
Traceback (most recent call last):
...
ValueError: the specification of this method has changed; please specify the lines as well
Check that :trac:`30891` is fixed::
sage: p = Polyhedron(vertices=[(-3,-3), (3,0), (3,3), (0,3)], backend='normaliz')
sage: q = loads(p.dumps())
sage: q.volume()
18
sage: q.ehrhart_series()
(13*t^2 + 22*t + 1)/(-t^3 + 3*t^2 - 3*t + 1)
"""
if eqns in (True, False, None):
# Previously, the method had input ``vertices, rays, ieqs, eqns`` (optionally ``verbose``).
Expand Down Expand Up @@ -802,7 +811,7 @@ def rays_subspace_lattice_ieqs_QQ(vertices, rays, lines, ieqs):
nmz_ieqs.append(A + [b])

from sage.matrix.constructor import Matrix
lattice = Matrix(ZZ, nmz_vertices + nmz_rays + nmz_lines).row_space().basis()
lattice = Matrix(ZZ, nmz_vertices + nmz_rays + nmz_lines).saturation()
nmz_lattice = [[x for x in y] for y in lattice]

if Matrix(ZZ, nmz_vertices + nmz_rays).rank() == Matrix(ZZ, nmz_rays).rank() + 1:
Expand Down

0 comments on commit c7ed9b5

Please sign in to comment.