1010"""
1111
1212from _libsemigroups_pybind11 import (
13- KnuthBendixStringRewriteFromLeft as _KnuthBendixStringRewriteFromLeft ,
14- KnuthBendixStringRewriteTrie as _KnuthBendixStringRewriteTrie ,
15- KnuthBendixWordRewriteFromLeft as _KnuthBendixWordRewriteFromLeft ,
16- KnuthBendixWordRewriteTrie as _KnuthBendixWordRewriteTrie ,
13+ KnuthBendixStringLenLexSet as _KnuthBendixStringLenLexSet ,
14+ KnuthBendixStringLenLexTrie as _KnuthBendixStringLenLexTrie ,
15+ KnuthBendixWordLenLexSet as _KnuthBendixWordLenLexSet ,
16+ KnuthBendixWordLenLexTrie as _KnuthBendixWordLenLexTrie ,
1717 knuth_bendix_by_overlap_length as _knuth_bendix_by_overlap_length ,
1818 knuth_bendix_is_reduced as _knuth_bendix_is_reduced ,
1919 knuth_bendix_non_trivial_classes as _knuth_bendix_non_trivial_classes ,
3838
3939
4040class KnuthBendix (_CongruenceCommon ):
41- __doc__ = _KnuthBendixStringRewriteTrie .__doc__
41+ __doc__ = _KnuthBendixStringLenLexTrie .__doc__
4242
4343 _py_template_params_to_cxx_type = {
44- (list [int ],): _KnuthBendixWordRewriteTrie ,
45- (str ,): _KnuthBendixStringRewriteTrie ,
46- (list [int ], "RewriteTrie " ): _KnuthBendixWordRewriteTrie ,
47- (str , "RewriteTrie " ): _KnuthBendixStringRewriteTrie ,
48- (list [int ], "RewriteFromLeft " ): _KnuthBendixWordRewriteFromLeft ,
49- (str , "RewriteFromLeft " ): _KnuthBendixStringRewriteFromLeft ,
44+ (list [int ],): _KnuthBendixWordLenLexTrie ,
45+ (str ,): _KnuthBendixStringLenLexTrie ,
46+ (list [int ], "LenLexTrie " ): _KnuthBendixWordLenLexTrie ,
47+ (str , "LenLexTrie " ): _KnuthBendixStringLenLexTrie ,
48+ (list [int ], "LenLexSet " ): _KnuthBendixWordLenLexSet ,
49+ (str , "LenLexSet " ): _KnuthBendixStringLenLexSet ,
5050 }
5151
5252 _cxx_type_to_py_template_params = dict (
@@ -59,14 +59,14 @@ class KnuthBendix(_CongruenceCommon):
5959
6060 _all_wrapped_cxx_types = {* _py_template_params_to_cxx_type .values ()}
6161
62- options = _KnuthBendixStringRewriteTrie .options
62+ options = _KnuthBendixStringLenLexTrie .options
6363
64- @_copydoc (_KnuthBendixStringRewriteTrie .__init__ )
65- def __init__ (self , * args , rewriter = "RewriteTrie " , ** kwargs ) -> None :
66- if rewriter not in ("RewriteFromLeft " , "RewriteTrie " ):
64+ @_copydoc (_KnuthBendixStringLenLexTrie .__init__ )
65+ def __init__ (self , * args , rewriter = "LenLexTrie " , ** kwargs ) -> None :
66+ if rewriter not in ("LenLexSet " , "LenLexTrie " ):
6767 raise TypeError (
6868 f'expected the keyword argument "rewriter" to be '
69- f'"RewriteFromLeft " or "RewriteTrie ", but found "{ rewriter } "'
69+ f'"LenLexSet " or "LenLexTrie ", but found "{ rewriter } "'
7070 )
7171
7272 msg = f"""expected either:
@@ -93,11 +93,11 @@ def __init__(self, *args, rewriter="RewriteTrie", **kwargs) -> None:
9393# Copy mem fns from sample C++ type and register types
9494########################################################################
9595
96- _copy_cxx_mem_fns (_KnuthBendixStringRewriteTrie , KnuthBendix )
97- _register_cxx_wrapped_type (_KnuthBendixStringRewriteTrie , KnuthBendix )
98- _register_cxx_wrapped_type (_KnuthBendixWordRewriteTrie , KnuthBendix )
99- _register_cxx_wrapped_type (_KnuthBendixStringRewriteFromLeft , KnuthBendix )
100- _register_cxx_wrapped_type (_KnuthBendixWordRewriteFromLeft , KnuthBendix )
96+ _copy_cxx_mem_fns (_KnuthBendixStringLenLexTrie , KnuthBendix )
97+ _register_cxx_wrapped_type (_KnuthBendixStringLenLexTrie , KnuthBendix )
98+ _register_cxx_wrapped_type (_KnuthBendixWordLenLexTrie , KnuthBendix )
99+ _register_cxx_wrapped_type (_KnuthBendixStringLenLexSet , KnuthBendix )
100+ _register_cxx_wrapped_type (_KnuthBendixWordLenLexSet , KnuthBendix )
101101
102102########################################################################
103103# Helpers
0 commit comments