From c293bcd4d10ce34c507da9b89296e8675b16fad6 Mon Sep 17 00:00:00 2001 From: Joseph Edwards Date: Mon, 18 Nov 2024 02:25:31 +0000 Subject: [PATCH] wrap more functions --- libsemigroups_pybind11/schreier_sims.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/libsemigroups_pybind11/schreier_sims.py b/libsemigroups_pybind11/schreier_sims.py index 026a5d58..596b1b1f 100644 --- a/libsemigroups_pybind11/schreier_sims.py +++ b/libsemigroups_pybind11/schreier_sims.py @@ -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, @@ -92,6 +92,10 @@ 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) @@ -99,3 +103,12 @@ def strong_generator(self: Self, depth: int, index: int) -> Element: @_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))