Polyhedron_base.vertex_adjacency_matrix: Do not use face_lattice
Closed this issue · 14 comments
instead just go through self.combinatorial_polyhedron().edges()
This should be faster - and only avoids an indirect dependency of sage.geometry.polyhedron.plot on sage.combinat
CC: @kliem
Component: geometry
Author: Jonathan Kliem
Branch/Commit: 2cd253c
Reviewer: Frédéric Chapoton, Matthias Koeppe
Issue created by migration from https://trac.sagemath.org/ticket/32666
Author: Jonathan Kliem
Branch: public/32666
Reviewer: Frédéric Chapoton
ok, looks good
Thanks for working on this!
Thanks for the review.
This change turned out to be surprisingly uncomplicated.
how about
--- a/src/sage/geometry/polyhedron/combinatorial_polyhedron/base.pyx
+++ b/src/sage/geometry/polyhedron/combinatorial_polyhedron/base.pyx
@@ -1276,7 +1276,7 @@ cdef class CombinatorialPolyhedron(SageObject):
sage: polytopes.cube().vertex_adjacency_matrix().is_immutable()
True
"""
- from sage.rings.all import ZZ
+ from sage.rings.integer_ring import ZZ
from sage.matrix.constructor import matrix
Branch pushed to git repo; I updated commit sha1 and set ticket back to needs_review. New commits:
2cd253c | more specific import |
Changed reviewer from Frédéric Chapoton to Frédéric Chapoton, Matthias Koeppe
Thanks!
Changed branch from public/32666 to 2cd253c