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

Commit

Permalink
Use point collections more directly.
Browse files Browse the repository at this point in the history
  • Loading branch information
novoselt committed May 12, 2014
1 parent a5428af commit 1262262
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
9 changes: 4 additions & 5 deletions src/sage/geometry/lattice_polytope.py
Expand Up @@ -4660,11 +4660,8 @@ def index_of_face_in_lattice(self):
sage: face.index_of_face_in_lattice()
1
"""
n = self._polytope.dim()
vertices = self._polytope.vertices_pc().column_matrix().columns()
face_vertices = [vertices[i] for i in self._vertices]
S = span(face_vertices)
return S.index_in(ZZ**n)
S = span(self._polytope.vertices_pc()(self._vertices))
return S.index_in(self._polytope.lattice())

def interior_points(self):
r"""
Expand Down Expand Up @@ -5005,6 +5002,8 @@ def _palp_canonical_order(V, PM_max, permutations):
for k in permutations]
Vmin = min(Vs, key=lambda x:x[0])
vertices = map(V.module(), Vmin[0].columns())
for v in vertices:
v.set_immutable()
return (PointCollection(vertices, V.module()), Vmin[1])

def _palp_convert_permutation(permutation):
Expand Down
4 changes: 2 additions & 2 deletions src/sage/geometry/toric_lattice.py
Expand Up @@ -741,8 +741,8 @@ def span(self, *args, **kwds):
else:
base_ring = None
if base_ring is None or base_ring is ZZ:
return ToricLattice_sublattice(self.ambient_module(),
*args, **kwds)
gens = args[0] if args else kwds["gens"]
return ToricLattice_sublattice(self.ambient_module(), gens)
else:
return super(ToricLattice_generic, self).span(*args, **kwds)

Expand Down

0 comments on commit 1262262

Please sign in to comment.