Skip to content

Commit

Permalink
wrap more functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Joseph-Edwards committed Nov 18, 2024
1 parent 31cb171 commit c293bcd
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions libsemigroups_pybind11/schreier_sims.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
"""

from functools import wraps
from typing import List, TypeVar as _TypeVar
from typing import TypeVar as _TypeVar
from typing_extensions import Self

from _libsemigroups_pybind11 import (
intersection,
intersection as _intersection,
SchreierSimsPerm1 as _SchreierSimsPerm1,
SchreierSimsPerm2 as _SchreierSimsPerm2,
Perm1 as _Perm1,
Expand Down Expand Up @@ -92,10 +92,23 @@ def inverse_transversal_element(self: Self, depth: int, pt: int) -> Element:
def one(self: Self) -> Element:
return self._cxx_obj.one()

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

@_returns_element
def strong_generator(self: Self, depth: int, index: int) -> Element:
return self._cxx_obj.strong_generator(depth, index)

@_returns_element
def transversal_element(self: Self, depth: int, pt: int) -> Element:
return self._cxx_obj.transversal_element(depth, pt)


########################################################################
# Helpers -- from schreier-sims.cpp
########################################################################


def intersection(U: SchreierSims, S: SchreierSims, T: SchreierSims):
return _intersection(to_cxx(U), to_cxx(S), to_cxx(T))

0 comments on commit c293bcd

Please sign in to comment.