Skip to content

Commit

Permalink
CombinatorialPolyhedron.face_generator: Remove keyword 'dual' depreca…
Browse files Browse the repository at this point in the history
…ted in sagemath#33646 (2022)
  • Loading branch information
mkoeppe committed Apr 27, 2024
1 parent 9291ece commit 9826af1
Showing 1 changed file with 2 additions and 23 deletions.
25 changes: 2 additions & 23 deletions src/sage/geometry/polyhedron/combinatorial_polyhedron/base.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -2659,7 +2659,7 @@ cdef class CombinatorialPolyhedron(SageObject):
"""
return self.face_generator().meet_of_Hrep(*indices)

def face_generator(self, dimension=None, algorithm=None, **kwds):
def face_generator(self, dimension=None, algorithm=None):
r"""
Iterator over all proper faces of specified dimension.
Expand Down Expand Up @@ -2746,35 +2746,14 @@ cdef class CombinatorialPolyhedron(SageObject):
(A ray in the direction (1, 0), A vertex at (1, 0))
(A ray in the direction (0, 1), A vertex at (0, 1))
TESTS:
The kewword ``dual`` is deprecated::
sage: C = CombinatorialPolyhedron([[0,1,2],[0,1,3],[0,2,3],[1,2,3]])
sage: it = C.face_generator(1, False)
doctest:...: DeprecationWarning: the keyword dual is deprecated; use algorithm instead
See https://github.com/sagemath/sage/issues/33646 for details.
sage: it = C.face_generator(1, dual=True)
.. SEEALSO::
:class:`~sage.geometry.polyhedron.combinatorial_polyhedron.face_iterator.FaceIterator`,
:class:`~sage.geometry.polyhedron.combinatorial_polyhedron.combinatorial_face.CombinatorialFace`.
"""
cdef int dual

if algorithm in (False, True):
from sage.misc.superseded import deprecation
deprecation(33646, "the keyword dual is deprecated; use algorithm instead")
dual = int(algorithm)
else:
dual = self._algorithm_to_dual(algorithm)

if kwds:
from sage.misc.superseded import deprecation
deprecation(33646, "the keyword dual is deprecated; use algorithm instead")
if 'dual' in kwds and dual == -1 and kwds['dual'] in (False, True):
dual = int(kwds['dual'])
dual = self._algorithm_to_dual(algorithm)

if dual == -1:
# Determine the faster way, to iterate through all faces.
Expand Down

0 comments on commit 9826af1

Please sign in to comment.