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

Commit

Permalink
Merge branch normaliz3.5.3 and pynormaliz1.12 into sage8.2.rc2
Browse files Browse the repository at this point in the history
  • Loading branch information
jplab committed Apr 13, 2018
2 parents 303efaa + 7057ef4 commit aa0e2ca
Show file tree
Hide file tree
Showing 9 changed files with 82 additions and 26 deletions.
6 changes: 3 additions & 3 deletions build/pkgs/normaliz/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
tarball=normaliz-VERSION.tar.gz
sha1=81c89b5b2f8ff15d6939a3fd5822a288440f4d51
md5=245b1c025ee45d0e2ffd3a77a585768e
cksum=3791680398
sha1=927f9683b615389ae06fb0b83272abffd977c4e5
md5=f6f5f498ccd19cb1c0a819b4147aec51
cksum=2376092445
2 changes: 1 addition & 1 deletion build/pkgs/normaliz/dependencies
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$(MP_LIBRARY) singular boost_cropped
$(MP_LIBRARY) singular boost_cropped flint

----------
All lines of this file are ignored except the first.
Expand Down
2 changes: 1 addition & 1 deletion build/pkgs/normaliz/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.2.1
3.5.3
12 changes: 0 additions & 12 deletions build/pkgs/normaliz/patches/22684_cone_reduce_memory_usage.patch

This file was deleted.

4 changes: 3 additions & 1 deletion build/pkgs/normaliz/spkg-install
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ die () {
cd src

# Disable features that require packages SCIP and CoCoA, for which we don't have packages (yet).
./configure --disable-scip --disable-nmzintegrate --prefix=$SAGE_LOCAL || die "Error configuring normaliz"
# FLINT is a standard package. We pass --enable-flint to configure so that an error will be signalled
# if FLINT cannot be found, rather than building normaliz without it.
./configure --disable-scip --disable-nmzintegrate --enable-flint --prefix=$SAGE_LOCAL || die "Error configuring normaliz"
$MAKE || die "Error building normaliz"
$MAKE install || die "Error installing normaliz"

6 changes: 3 additions & 3 deletions build/pkgs/pynormaliz/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
tarball=PyNormaliz-VERSION.tar.gz
sha1=619d2b01d9ee20bfcf880cb25ea04b72cc2d2942
md5=22eea4624caff219618640ed67003b9d
cksum=4251733870
sha1=8acc2f51ed31b1d8e965f43b82ad08b0d35111e9
md5=1ec3419eaa061a0ee4b4f1ffca9cb44d
cksum=796575946
2 changes: 1 addition & 1 deletion build/pkgs/pynormaliz/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.5
1.12
70 changes: 68 additions & 2 deletions src/sage/geometry/polyhedron/backend_normaliz.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class Polyhedron_normaliz(Polyhedron_base):
sage: P.n_inequalities() # optional - pynormaliz
1
sage: P.equations() # optional - pynormaliz
(An equation (1, 0) x - 1 == 0,)
(An equation (-1, 0) x + 1 == 0,)
The empty polyhedron::
Expand Down Expand Up @@ -419,7 +419,7 @@ def integral_hull(self):
sage: PI.Vrepresentation() # optional - pynormaliz
(A vertex at (1, 0),
A ray in the direction (1, 0),
A line in the direction (1, -1))
A line in the direction (-1, 1))
Empty polyhedron::
Expand Down Expand Up @@ -564,6 +564,72 @@ def integral_points(self, threshold=10000):
(None, None)
sage: P.integral_points() # optional - pynormaliz
()
Check the polytopes from :trac:`22984`::
sage: base = [[0, 2, 0, -1, 0, 0, 0, 0, 0],
....: [0, 0, 2, 0, -1, 0, 0, 0, 0],
....: [1, -1, 0, 2, -1, 0, 0, 0, 0],
....: [0, 0, -1, -1, 2, -1, 0, 0, 0],
....: [0, 0, 0, 0, -1, 2, -1, 0, 0],
....: [0, 0, 0, 0, 0, -1, 2, -1, 0],
....: [1, 0, 0, 0, 0, 0, -1, 2, -1],
....: [0, 0, 0, 0, 0, 0, 0, -1, 2],
....: [0, -1, 0, 0, 0, 0, 0, 0, 0],
....: [0, 0, -1, 0, 0, 0, 0, 0, 0],
....: [0, 0, 0, -1, 0, 0, 0, 0, 0],
....: [0, 0, 0, 0, -1, 0, 0, 0, 0],
....: [0, 0, 0, 0, 0, -1, 0, 0, 0],
....: [0, 0, 0, 0, 0, 0, -1, 0, 0],
....: [0, 0, 0, 0, 0, 0, 0, -1, 0],
....: [0, 0, 0, 0, 0, 0, 0, 0, -1],
....: [-1, -1, -1, -1, -1, -1, -1, -1, -1]]
sage: ieqs = base + [
....: [2, 1, 0, 0, 0, 0, 0, 0, 0],
....: [4, 0, 1, 0, 0, 0, 0, 0, 0],
....: [4, 0, 0, 1, 0, 0, 0, 0, 0],
....: [7, 0, 0, 0, 1, 0, 0, 0, 0],
....: [6, 0, 0, 0, 0, 1, 0, 0, 0],
....: [4, 0, 0, 0, 0, 0, 1, 0, 0],
....: [2, 0, 0, 0, 0, 0, 0, 1, 0],
....: [1, 0, 0, 0, 0, 0, 0, 0, 1]]
sage: P = Polyhedron(ieqs=ieqs, backend='normaliz') # optional - pynormaliz
sage: P.integral_points() # optional - pynormaliz
((-2, -2, -4, -5, -4, -3, -2, -1),
(-2, -2, -4, -5, -4, -3, -2, 0),
(-1, -2, -3, -4, -3, -2, -2, -1),
(-1, -2, -3, -4, -3, -2, -1, 0),
(-1, -1, -2, -2, -2, -2, -2, -1),
(-1, -1, -2, -2, -1, -1, -1, 0),
(-1, -1, -2, -2, -1, 0, 0, 0),
(-1, 0, -2, -2, -2, -2, -2, -1),
(0, -1, -1, -2, -2, -2, -2, -1),
(0, 0, -1, -1, -1, -1, -1, 0))
sage: ieqs = base + [
....: [3, 1, 0, 0, 0, 0, 0, 0, 0],
....: [4, 0, 1, 0, 0, 0, 0, 0, 0],
....: [6, 0, 0, 1, 0, 0, 0, 0, 0],
....: [8, 0, 0, 0, 1, 0, 0, 0, 0],
....: [6, 0, 0, 0, 0, 1, 0, 0, 0],
....: [4, 0, 0, 0, 0, 0, 1, 0, 0],
....: [2, 0, 0, 0, 0, 0, 0, 1, 0],
....: [1, 0, 0, 0, 0, 0, 0, 0, 1]]
sage: P = Polyhedron(ieqs=ieqs, backend='normaliz') # optional - pynormaliz
sage: P.integral_points() # optional - pynormaliz
((-3, -4, -6, -8, -6, -4, -2, -1),
(-3, -4, -6, -8, -6, -4, -2, 0),
(-2, -2, -4, -5, -4, -3, -2, -1),
(-2, -2, -4, -5, -4, -3, -2, 0),
(-1, -2, -3, -4, -3, -2, -2, -1),
(-1, -2, -3, -4, -3, -2, -1, 0),
(-1, -1, -2, -2, -2, -2, -2, -1),
(-1, -1, -2, -2, -1, -1, -1, 0),
(-1, -1, -2, -2, -1, 0, 0, 0),
(-1, 0, -2, -2, -2, -2, -2, -1),
(0, -1, -1, -2, -2, -2, -2, -1),
(0, 0, -1, -1, -1, -1, -1, 0))
"""
import PyNormaliz
if not self.is_compact():
Expand Down
4 changes: 2 additions & 2 deletions src/sage/geometry/polyhedron/constructor.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,8 +369,8 @@ def Polyhedron(vertices=None, rays=None, lines=None,
not used.
- ``verbose`` -- boolean (default: ``False``). Whether to print
verbose output for debugging purposes. Only supported by the cdd
backends.
verbose output for debugging purposes. Only supported by the cdd and
normaliz backends.
OUTPUT:
Expand Down

0 comments on commit aa0e2ca

Please sign in to comment.