Skip to content

Commit d8bae07

Browse files
Fix FroidurePin signature
1 parent ad797ca commit d8bae07

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

src/froidure-pin.cpp

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,18 @@ namespace libsemigroups {
4242
using FroidurePin_ = FroidurePin<Element>;
4343

4444
std::string pyclass_name = std::string("FroidurePin") + name;
45-
py::class_<FroidurePin_, FroidurePinBase> thing(m,
46-
pyclass_name.c_str(),
47-
R"pbdoc(
45+
py::class_<FroidurePin_, FroidurePinBase> thing(
46+
m,
47+
pyclass_name.c_str(),
48+
// To change the top-level signature of a class, :sig=...: should be
49+
// specified here in the class docstring. This is most likely the
50+
// desired behaiour if a constructor is not overloaded.
51+
// If the constructor is overloaded and the signature of an individual
52+
// overload is to be changed, :sig=...: should be specified in the
53+
// docstring of that py::init function.
54+
R"pbdoc(
55+
:sig=(self: FroidurePin, gens: List[Element]) -> None:
56+
4857
Class implementing the Froidure-Pin algorithm.
4958
5059
A :any:`FroidurePin` instance represents a semigroup or monoid defined by a
@@ -935,7 +944,7 @@ This function returns the element of *fp* obtained by evaluating *w*.
935944
}
936945
// TODO(1) are there some functions missing here?
937946
} // bind_froidure_pin
938-
} // namespace
947+
} // namespace
939948

940949
void init_froidure_pin(py::module& m) {
941950
// TODO(0) uncomment bind_froidure_pin<HPCombiTransf<16>>(m, "Transf16");

0 commit comments

Comments
 (0)