Skip to content

Commit be0f523

Browse files
committed
WIP PermutedMatrixWindow
1 parent 1ca4a47 commit be0f523

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/sage/geometry/lattice_polytope.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@
142142
from sage.structure.richcmp import richcmp_method, richcmp
143143
from sage.geometry.convex_set import ConvexSet_compact
144144
import sage.geometry.abc
145+
from sage.matrix.permuted_matrix_window import PermutedMatrixWindow
145146

146147
from copy import copy
147148
from collections.abc import Hashable
@@ -3193,11 +3194,12 @@ def PGE(S, u, v):
31933194
return S.one()
31943195
return S((u, v), check=False)
31953196

3196-
PM = self.vertex_facet_pairing_matrix()
3197-
n_v = PM.ncols()
3198-
n_f = PM.nrows()
3197+
PM_old = self.vertex_facet_pairing_matrix()
3198+
n_v = PM_old.ncols()
3199+
n_f = PM_old.nrows()
31993200
S_v = SymmetricGroup(n_v)
32003201
S_f = SymmetricGroup(n_f)
3202+
PM = PermutedMatrixWindow(PM_old, 0, 0, n_f, n_v)
32013203

32023204
# and find all the ways of making the first row of PM_max
32033205
def index_of_max(iterable):
@@ -3396,7 +3398,7 @@ def index_of_max(iterable):
33963398
S[c] = c + 1
33973399
c += 1
33983400
# Now we have the perms, we construct PM_max using one of them
3399-
PM_max = PM.with_permuted_rows_and_columns(*permutations[0])
3401+
PM_max = PM_old.with_permuted_rows_and_columns(*permutations[0])
34003402
if check:
34013403
return (PM_max, permutations)
34023404
else:

0 commit comments

Comments
 (0)