Skip to content

Commit

Permalink
Merge branch 'delta_classification' into palp_normal_form_cythonize
Browse files Browse the repository at this point in the history
  • Loading branch information
xuluze committed Aug 23, 2023
2 parents bb2f549 + f46cb41 commit 99a3d7c
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 6 deletions.
8 changes: 4 additions & 4 deletions build/pkgs/normaliz/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
tarball=normaliz-VERSION.tar.gz
sha1=16fcf28e862f8d7c971c9fa682cbacb24fcf8ce1
md5=0d8a2e841193bb4b2422aac7744ece0b
cksum=2885510960
upstream_url=https://github.com/Normaliz/Normaliz/releases/download/VERSION/normaliz-VERSION.tar.gz
sha1=d3c4e554c6a5ccf4fd04147e7744a63e3def1766
md5=1c7a7833ad180ef4e0e4f124ed398973
cksum=3124231015
upstream_url=https://github.com/Normaliz/Normaliz/releases/download/vVERSION/normaliz-VERSION.tar.gz
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.10.0
3.10.1
21 changes: 21 additions & 0 deletions build/pkgs/normaliz/patches/411.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
commit ecdb62c90a3767b440800dcf2c49589e890a53b1
Author: Matthias Koeppe <[email protected]>
Date: Tue Aug 8 17:03:32 2023 -0700

full_cone.cpp: Remove debug output

diff --git a/source/libnormaliz/full_cone.cpp b/source/libnormaliz/full_cone.cpp
index 0fd906b3..cb2cce2b 100644
--- a/source/libnormaliz/full_cone.cpp
+++ b/source/libnormaliz/full_cone.cpp
@@ -3447,8 +3447,8 @@ void Full_Cone<Integer>::build_cone_dynamic() {
// if they aren't in a hyperplane anyway
if(IntHullNorm.size() > 0){
#pragma omp parallel for
- for(size_t i = 0; i< OriGens.nr_of_rows(); ++i){
- cout << "i " << i << " -- " << OriGensFloat[i];
+ for (size_t i = 0; i< OriGens.nr_of_rows(); ++i){
+ // cout << "i " << i << " -- " << OriGensFloat[i];
nmz_float norm = v_scalar_product(OriGensFloat[i], IntHullNormFloat);
v_scalar_division(OriGensFloat[i], norm);
}
7 changes: 7 additions & 0 deletions src/sage/geometry/lattice_polytope.py
Original file line number Diff line number Diff line change
Expand Up @@ -3197,6 +3197,13 @@ def _palp_PM_max(self, check=False):
....: for j, i in PMs )
sage: all(results) # long time
True
sage: P = Polyhedron([(-4,-6),(-4,-5),(0,0),(1,0),(5,6)])
sage: P.lattice_polytope()._palp_PM_max()
[9 5 4 0 0]
[6 0 6 5 0]
[1 5 0 0 4]
[0 6 0 1 6]
[0 0 3 5 3]
"""
from .palp_normal_form import _palp_PM_max
return _palp_PM_max(self.vertex_facet_pairing_matrix(), check)
Expand Down
14 changes: 13 additions & 1 deletion src/sage/geometry/palp_normal_form.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,18 @@ def _palp_PM_max(Matrix_integer_dense PM, check=False):
....: for j, i in PMs )
sage: all(results) # long time
True
sage: from sage.geometry.palp_normal_form import _palp_PM_max, _palp_canonical_order
sage: P = Polyhedron([(-4,-6),(-4,-5),(0,0),(1,0),(5,6)])
sage: PM = P.slack_matrix().transpose()
sage: _palp_PM_max(PM)
[9 5 4 0 0]
[6 0 6 5 0]
[1 5 0 0 4]
[0 6 0 1 6]
[0 0 3 5 3]
sage: PM_max, permutations = _palp_PM_max(PM, check=True)
sage: _palp_canonical_order(P.vertices(), PM_max, permutations)
([(1, 0), (0, 0), (2, 4), (1, 5), (-1, 1)], (1,2,3))
"""
cdef int n_v = PM.ncols()
cdef int n_f = PM.nrows()
Expand All @@ -82,7 +94,7 @@ def _palp_PM_max(Matrix_integer_dense PM, check=False):
cdef int element, max_element

for j in range(n_v):
m = index_of_max(PM[0, i] for i in range(j, n_v))
m = index_of_max(PM.get_unsafe_int(0, (<PermutationGroupElement> permutations[0][1])(i + 1) - 1) for i in range(j, n_v))
if m > 0:
permutations[0][1] = (<PermutationGroupElement> permutations[0][1])._transpose_left(j + 1, m + j + 1)

Expand Down

0 comments on commit 99a3d7c

Please sign in to comment.