12
12
from _libsemigroups_pybind11 import (
13
13
to_congruence_string as _to_congruence_string ,
14
14
to_congruence_word as _to_congruence_word ,
15
- to_froidure_pin ,
16
- to_inverse_presentation_string ,
17
- to_inverse_presentation_word ,
18
- to_inverse_presentation ,
19
- to_knuth_bendix_RewriteFromLeft ,
20
- to_knuth_bendix_RewriteTrie ,
21
- to_knuth_bendix_string_RewriteFromLeft ,
22
- to_knuth_bendix_string_RewriteTrie ,
23
- to_knuth_bendix_word_RewriteFromLeft ,
24
- to_knuth_bendix_word_RewriteTrie ,
25
- to_knuth_bendix ,
26
- to_presentation_string ,
27
- to_presentation_word ,
28
- to_presentation ,
29
- to_todd_coxeter_string ,
30
- to_todd_coxeter_word ,
31
- to_todd_coxeter ,
15
+ to_froidure_pin as _to_froidure_pin ,
16
+ to_inverse_presentation_string as _to_inverse_presentation_string ,
17
+ to_inverse_presentation_word as _to_inverse_presentation_word ,
18
+ to_inverse_presentation as _to_inverse_presentation ,
19
+ to_knuth_bendix_RewriteFromLeft as _to_knuth_bendix_RewriteFromLeft ,
20
+ to_knuth_bendix_RewriteTrie as _to_knuth_bendix_RewriteTrie ,
21
+ to_knuth_bendix_string_RewriteFromLeft as _to_knuth_bendix_string_RewriteFromLeft ,
22
+ to_knuth_bendix_string_RewriteTrie as _to_knuth_bendix_string_RewriteTrie ,
23
+ to_knuth_bendix_word_RewriteFromLeft as _to_knuth_bendix_word_RewriteFromLeft ,
24
+ to_knuth_bendix_word_RewriteTrie as _to_knuth_bendix_word_RewriteTrie ,
25
+ to_knuth_bendix as _to_knuth_bendix ,
26
+ to_presentation_string as _to_presentation_string ,
27
+ to_presentation_word as _to_presentation_word ,
28
+ to_presentation as _to_presentation ,
29
+ to_todd_coxeter_string as _to_todd_coxeter_string ,
30
+ to_todd_coxeter_word as _to_todd_coxeter_word ,
31
+ to_todd_coxeter as _to_todd_coxeter ,
32
32
)
33
33
34
- from .congruence import Congruence
35
- from .froidure_pin import FroidurePin
36
- from .knuth_bendix import KnuthBendix
37
- from .presentation import Presentation , InversePresentation
38
- from .todd_coxeter import ToddCoxeter
39
- from .detail .cxx_wrapper import to_cxx
34
+ from .congruence import Congruence as _Congruence
35
+ from .froidure_pin import FroidurePin as _FroidurePin
36
+ from .knuth_bendix import KnuthBendix as _KnuthBendix
37
+ from .presentation import (
38
+ Presentation as _Presentation ,
39
+ InversePresentation as _InversePresentation ,
40
+ )
41
+ from .todd_coxeter import ToddCoxeter as _ToddCoxeter
42
+ from .detail .cxx_wrapper import to_cxx as _to_cxx
40
43
41
44
42
45
def __to_congruence_word (* args ):
43
- return Congruence (_to_congruence_word (* args ))
46
+ return _Congruence (_to_congruence_word (* args ))
44
47
45
48
46
49
def __to_congruence_string (* args ):
47
- return Congruence (_to_congruence_string (* args ))
50
+ return _Congruence (_to_congruence_string (* args ))
48
51
49
52
50
53
def _nice_name (type_list ):
@@ -83,26 +86,26 @@ def to(*args, Return):
83
86
84
87
>>> from libsemigroups_pybind11 import (
85
88
... congruence_kind,
86
- ... FroidurePin ,
87
- ... KnuthBendix ,
88
- ... Presentation ,
89
+ ... _FroidurePin ,
90
+ ... _KnuthBendix ,
91
+ ... _Presentation ,
89
92
... presentation,
90
93
... to,
91
94
... )
92
95
93
- >>> p = Presentation ([0, 1])
96
+ >>> p = _Presentation ([0, 1])
94
97
>>> presentation.add_rule(p, [0, 1], [1, 0])
95
98
>>> presentation.add_rule(p, [0, 0], [0])
96
99
>>> presentation.add_rule(p, [1, 1], [1])
97
- >>> kb = KnuthBendix (congruence_kind.twosided, p)
100
+ >>> kb = _KnuthBendix (congruence_kind.twosided, p)
98
101
99
- >>> fp = to(kb, Return=FroidurePin )
102
+ >>> fp = to(kb, Return=_FroidurePin )
100
103
>>> fp
101
- <partially enumerated FroidurePin with 2 generators, 2 elements, Cayley graph ⌀ 1, & 0 rules>
104
+ <partially enumerated _FroidurePin with 2 generators, 2 elements, Cayley graph ⌀ 1, & 0 rules>
102
105
103
106
>>> fp.run()
104
107
>>> fp
105
- <fully enumerated FroidurePin with 2 generators, 3 elements, Cayley graph ⌀ 2, & 3 rules>
108
+ <fully enumerated _FroidurePin with 2 generators, 3 elements, Cayley graph ⌀ 2, & 3 rules>
106
109
107
110
.. seealso::
108
111
@@ -117,56 +120,58 @@ def to(*args, Return):
117
120
* :doc:`/main-algorithms/todd-coxeter/to-todd-coxeter`.
118
121
119
122
"""
120
- cxx_args = [to_cxx (arg ) for arg in args ]
123
+ cxx_args = [_to_cxx (arg ) for arg in args ]
121
124
return_type_to_converter_function = {
122
- (Congruence , str ): __to_congruence_string ,
123
- (Congruence , List [int ]): __to_congruence_word ,
124
- FroidurePin : lambda * x : FroidurePin ( to_froidure_pin (* x )),
125
- InversePresentation : lambda * x : InversePresentation (
126
- to_inverse_presentation (* x )
125
+ (_Congruence , str ): __to_congruence_string ,
126
+ (_Congruence , List [int ]): __to_congruence_word ,
127
+ _FroidurePin : lambda * x : _FroidurePin ( _to_froidure_pin (* x )),
128
+ _InversePresentation : lambda * x : _InversePresentation (
129
+ _to_inverse_presentation (* x )
127
130
),
128
- (InversePresentation , List [int ]): lambda * x : InversePresentation (
129
- to_inverse_presentation_word (* x )
131
+ (_InversePresentation , List [int ]): lambda * x : _InversePresentation (
132
+ _to_inverse_presentation_word (* x )
130
133
),
131
- (InversePresentation , str ): lambda * x : InversePresentation (
132
- to_inverse_presentation_string (* x )
134
+ (_InversePresentation , str ): lambda * x : _InversePresentation (
135
+ _to_inverse_presentation_string (* x )
133
136
),
134
- KnuthBendix : lambda * x : KnuthBendix ( to_knuth_bendix (* x )),
135
- (KnuthBendix , "RewriteTrie" ): lambda * x : KnuthBendix (
136
- to_knuth_bendix_RewriteTrie (* x )
137
+ _KnuthBendix : lambda * x : _KnuthBendix ( _to_knuth_bendix (* x )),
138
+ (_KnuthBendix , "RewriteTrie" ): lambda * x : _KnuthBendix (
139
+ _to_knuth_bendix_RewriteTrie (* x )
137
140
),
138
- (KnuthBendix , "RewriteFromLeft" ): lambda * x : KnuthBendix (
139
- to_knuth_bendix_RewriteFromLeft (* x )
141
+ (_KnuthBendix , "RewriteFromLeft" ): lambda * x : _KnuthBendix (
142
+ _to_knuth_bendix_RewriteFromLeft (* x )
140
143
),
141
144
(
142
- KnuthBendix ,
145
+ _KnuthBendix ,
143
146
List [int ],
144
147
"RewriteFromLeft" ,
145
- ): lambda * x : KnuthBendix ( to_knuth_bendix_word_RewriteFromLeft (* x )),
148
+ ): lambda * x : _KnuthBendix ( _to_knuth_bendix_word_RewriteFromLeft (* x )),
146
149
(
147
- KnuthBendix ,
150
+ _KnuthBendix ,
148
151
List [int ],
149
152
"RewriteTrie" ,
150
- ): lambda * x : KnuthBendix ( to_knuth_bendix_word_RewriteTrie (* x )),
153
+ ): lambda * x : _KnuthBendix ( _to_knuth_bendix_word_RewriteTrie (* x )),
151
154
(
152
- KnuthBendix ,
155
+ _KnuthBendix ,
153
156
str ,
154
157
"RewriteFromLeft" ,
155
- ): lambda * x : KnuthBendix (to_knuth_bendix_string_RewriteFromLeft (* x )),
156
- (KnuthBendix , str , "RewriteTrie" ): lambda * x : KnuthBendix (
157
- to_knuth_bendix_string_RewriteTrie (* x )
158
+ ): lambda * x : _KnuthBendix (_to_knuth_bendix_string_RewriteFromLeft (* x )),
159
+ (_KnuthBendix , str , "RewriteTrie" ): lambda * x : _KnuthBendix (
160
+ _to_knuth_bendix_string_RewriteTrie (* x )
161
+ ),
162
+ _Presentation : lambda * x : _Presentation (_to_presentation (* x )),
163
+ (_Presentation , str ): lambda * x : _Presentation (
164
+ _to_presentation_string (* x )
158
165
),
159
- Presentation : lambda * x : Presentation (to_presentation (* x )),
160
- (Presentation , str ): lambda * x : Presentation (
161
- to_presentation_string (* x )
166
+ (_Presentation , List [int ]): lambda * x : _Presentation (
167
+ _to_presentation_word (* x )
162
168
),
163
- (Presentation , List [int ]): lambda * x : Presentation (
164
- to_presentation_word (* x )
169
+ _ToddCoxeter : lambda * x : _ToddCoxeter (_to_todd_coxeter (* x )),
170
+ (_ToddCoxeter , str ): lambda * x : _ToddCoxeter (
171
+ _to_todd_coxeter_string (* x )
165
172
),
166
- ToddCoxeter : lambda * x : ToddCoxeter (to_todd_coxeter (* x )),
167
- (ToddCoxeter , str ): lambda * x : ToddCoxeter (to_todd_coxeter_string (* x )),
168
- (ToddCoxeter , List [int ]): lambda * x : ToddCoxeter (
169
- to_todd_coxeter_word (* x )
173
+ (_ToddCoxeter , List [int ]): lambda * x : _ToddCoxeter (
174
+ _to_todd_coxeter_word (* x )
170
175
),
171
176
}
172
177
0 commit comments