Skip to content

Commit

Permalink
Add method to FroidurePin that maybe returns UNDEFINED
Browse files Browse the repository at this point in the history
  • Loading branch information
james-d-mitchell committed Dec 5, 2024
1 parent 73b169d commit bd5abb8
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions libsemigroups_pybind11/froidure_pin.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,14 +157,10 @@ def __iter__(self: Self) -> Iterator:
########################################################################

def current_elements(self: Self) -> Iterator:
return map(
lambda x: to_py(self.Element, x), self._cxx_obj.current_elements()
)
return map(lambda x: to_py(self.Element, x), self._cxx_obj.current_elements())

def idempotents(self: Self) -> Iterator:
return map(
lambda x: to_py(self.Element, x), self._cxx_obj.idempotents()
)
return map(lambda x: to_py(self.Element, x), self._cxx_obj.idempotents())

def sorted_elements(self: Self) -> Iterator:
return map(
Expand All @@ -184,6 +180,10 @@ def generator(self: Self, i: int) -> Element:
def sorted_at(self: Self, i: int) -> Element:
return self._cxx_obj.sorted_at(i)

@may_return_undefined
def current_position(self: Self, x: Element) -> Element:
return self._cxx_obj.current_position(to_cxx(x))


########################################################################
# Helpers -- from froidure-pin.cpp
Expand Down

0 comments on commit bd5abb8

Please sign in to comment.