61
61
NGroupExpression::substitute, 2, 3);
62
62
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(OL_addGenerator,
63
63
NGroupPresentation::addGenerator, 0, 1);
64
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(OL_nielsenCombine,
65
NGroupPresentation::nielsenCombine, 3, 4);
67
std::auto_ptr<NGroupExpression> newExpression_str(const std::string& str) {
68
return std::auto_ptr<NGroupExpression>(new NGroupExpression(str, 0));
65
71
object getTerms_list(const NGroupExpression& e) {
66
72
boost::python::list ans;
95
101
p.writeTextCompact(std::cout);
98
regina::NHomGroupPresentation* intelligentSimplifyDetail_ptr(
99
NGroupPresentation& p) {
100
return p.intelligentSimplifyDetail().release();
103
regina::NAbelianGroup* abelianisation_ptr(const NGroupPresentation& p) {
104
return p.abelianisation().release();
107
regina::NMarkedAbelianGroup* markedAbelianisation_ptr(
108
const NGroupPresentation& p) {
109
return p.markedAbelianisation().release();
112
104
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(OL_proliferateRelators,
113
105
NGroupPresentation::proliferateRelators, 0, 1);
129
122
std::auto_ptr<NGroupExpression>, boost::noncopyable>
130
123
("NGroupExpression")
131
124
.def(init<const NGroupExpression&>())
125
.def("__init__", boost::python::make_constructor(newExpression_str))
132
127
.def("getTerms", getTerms_list)
133
128
.def("getNumberOfTerms", &NGroupExpression::getNumberOfTerms)
134
129
.def("wordLength", &NGroupExpression::wordLength)
130
.def("isTrivial", &NGroupExpression::isTrivial)
135
131
.def("erase", &NGroupExpression::erase)
136
132
.def("getTerm", getTerm_non_const, return_internal_reference<>())
137
133
.def("getGenerator", &NGroupExpression::getGenerator)
142
138
.def("addTermLast", addTermLast_pair)
143
139
.def("addTermsFirst", &NGroupExpression::addTermsFirst)
144
140
.def("addTermsLast", &NGroupExpression::addTermsLast)
141
.def("addStringFirst", &NGroupExpression::addStringFirst)
142
.def("addStringLast", &NGroupExpression::addStringLast)
145
143
.def("cycleLeft", &NGroupExpression::cycleLeft)
146
144
.def("cycleRight", &NGroupExpression::cycleRight)
147
145
.def("inverse", &NGroupExpression::inverse,
168
166
.def("getNumberOfRelations", &NGroupPresentation::getNumberOfRelations)
169
167
.def("getRelation", &NGroupPresentation::getRelation,
170
168
return_internal_reference<>())
169
.def("isValid", &NGroupPresentation::isValid)
171
170
.def("intelligentSimplify", &NGroupPresentation::intelligentSimplify)
172
171
.def("intelligentSimplifyDetail",
173
intelligentSimplifyDetail_ptr,
174
return_value_policy<manage_new_object>())
172
&NGroupPresentation::intelligentSimplifyDetail)
173
.def("smallCancellation", &NGroupPresentation::smallCancellation)
174
.def("smallCancellationDetail",
175
&NGroupPresentation::smallCancellationDetail)
176
.def("simplifyWord", &NGroupPresentation::simplifyWord)
175
177
.def("proliferateRelators", &NGroupPresentation::proliferateRelators,
176
178
OL_proliferateRelators())
179
.def("identifyAbelian", &NGroupPresentation::identifyAbelian)
180
.def("nielsenTransposition", &NGroupPresentation::nielsenTransposition)
181
.def("nielsenInvert", &NGroupPresentation::nielsenInvert)
182
.def("nielsenCombine", &NGroupPresentation::nielsenCombine,
184
.def("intelligentNielsen", &NGroupPresentation::intelligentNielsen)
185
.def("intelligentNielsenDetail",
186
&NGroupPresentation::intelligentNielsenDetail)
187
.def("homologicalAlignment", &NGroupPresentation::homologicalAlignment)
188
.def("homologicalAlignmentDetail",
189
&NGroupPresentation::homologicalAlignmentDetail)
190
.def("prettyRewriting", &NGroupPresentation::prettyRewriting)
191
.def("prettyRewritingDetail",
192
&NGroupPresentation::prettyRewritingDetail)
193
.def("identifySimplyIsomorphicTo",
194
&NGroupPresentation::identifySimplyIsomorphicTo)
177
195
.def("recogniseGroup", &NGroupPresentation::recogniseGroup)
178
196
.def("relatorLength", &NGroupPresentation::relatorLength)
179
.def("abelianisation", abelianisation_ptr,
180
return_value_policy<manage_new_object>())
181
.def("markedAbelianisation", markedAbelianisation_ptr,
182
return_value_policy<manage_new_object>())
197
.def("abelianisation", &NGroupPresentation::abelianisation)
198
.def("markedAbelianisation", &NGroupPresentation::markedAbelianisation)
183
199
.def("toTeX", &NGroupPresentation::toTeX)
184
200
.def("toStringCompact", &NGroupPresentation::toStringCompact)
185
201
.def("compact", &NGroupPresentation::compact)