35
35
#include < libsemigroups/types.hpp> // for word_type
36
36
37
37
// pybind11....
38
+ #include < pybind11/chrono.h> // for auto conversion of py types for run_for
38
39
#include < pybind11/pybind11.h> // for class_, init, make_iterator, module
39
40
#include < pybind11/stl.h>
40
41
@@ -50,7 +51,7 @@ namespace libsemigroups {
50
51
namespace py = pybind11;
51
52
52
53
namespace libsemigroups {
53
- void init_cong (py::module & m) {
54
+ void init_cong (py::module & m) {
54
55
py::class_<Congruence>(m, " Congruence" )
55
56
.def (py::init<congruence_kind>(),
56
57
py::arg (" kind" ),
@@ -85,7 +86,7 @@ namespace libsemigroups {
85
86
86
87
:Complexity: Linear in the size of ``S``.
87
88
)pbdoc" )
88
- .def (py::init<congruence_kind, FpSemigroup &>(),
89
+ .def (py::init<congruence_kind, FpSemigroup&>(),
89
90
py::arg (" kind" ),
90
91
py::arg (" S" ),
91
92
R"pbdoc(
@@ -110,7 +111,7 @@ namespace libsemigroups {
110
111
&Congruence::number_of_generators,
111
112
cong_intf_doc_strings::number_of_generators)
112
113
.def (" add_pair" ,
113
- py::overload_cast<word_type const &, word_type const &>(
114
+ py::overload_cast<word_type const &, word_type const &>(
114
115
&Congruence::add_pair),
115
116
py::arg (" u" ),
116
117
py::arg (" v" ),
@@ -142,8 +143,7 @@ namespace libsemigroups {
142
143
py::arg (" t" ),
143
144
runner_doc_strings::run_for)
144
145
.def (" run_until" ,
145
- (void (Congruence::*)(std::function<bool ()> &))
146
- & Runner::run_until,
146
+ (void (Congruence::*)(std::function<bool ()>&)) & Runner::run_until,
147
147
py::arg (" func" ),
148
148
runner_doc_strings::run_until)
149
149
.def (" less" ,
@@ -169,7 +169,7 @@ namespace libsemigroups {
169
169
cong_intf_doc_strings::number_of_non_trivial_classes)
170
170
.def (
171
171
" non_trivial_classes" ,
172
- [](Congruence & C, size_t i) {
172
+ [](Congruence& C, size_t i) {
173
173
return C.non_trivial_classes ()->at (i);
174
174
},
175
175
py::arg (" i" ),
@@ -245,7 +245,7 @@ namespace libsemigroups {
245
245
runner_doc_strings::stopped_by_predicate)
246
246
.def (
247
247
" generating_pairs" ,
248
- [](Congruence const & c) {
248
+ [](Congruence const & c) {
249
249
return py::make_iterator (c.cbegin_generating_pairs (),
250
250
c.cend_generating_pairs ());
251
251
},
0 commit comments