@@ -346,16 +346,66 @@ element of *fp* and ``False`` otherwise.
346346 return froidure_pin::factorisation (fpb, pos);
347347 },
348348 py::arg (" fpb" ),
349- py::arg (" pos" ));
349+ py::arg (" pos" ),
350+ R"pbdoc(
351+ :sig=(fp: FroidurePin, x: Element | int) -> list[int]:
352+ :only-document-once:
353+
354+ Returns a word containing a factorisation (in the generators) of an
355+ element.
356+
357+ This function returns a word in the generators that equals the given element
358+ *x*. The key difference between this function and :any:`minimal_factorisation`,
359+ is that the resulting factorisation may not be minimal.
360+
361+ :param fp: the :any:`FroidurePin` instance.
362+ :type fp: FroidurePin
363+
364+ :param x: a possible element, or index of element, to factorise.
365+ :type x: Element | int
366+
367+ :returns: Returns a word in the generators which evaluates to *x*.
368+ :rtype: list[int]
369+
370+ :raises LibsemigroupsError:
371+ if *x* is an ``Element`` and *x* does not belong to *fp*.
372+
373+ :raises LibsemigroupsError:
374+ if *x* is an :any:`int` and *x* is greater than or equal to :any:`FroidurePin.size`.
375+
376+ )pbdoc" );
350377
351- // Documented in the Element overload.
352378 m.def (
353379 " froidure_pin_minimal_factorisation" ,
354380 [](FroidurePin_& fp, size_t i) {
355381 return froidure_pin::minimal_factorisation (fp, i);
356382 },
357383 py::arg (" fp" ),
358- py::arg (" i" ));
384+ py::arg (" i" ),
385+ R"pbdoc(
386+ :sig=(fp: FroidurePin, x: Element | int) -> list[int]:
387+ :only-document-once:
388+ Returns a word containing a minimal factorisation (in the generators)
389+ of an element.
390+
391+ This function returns the short-lex minimum word (if any) in the generators
392+ that evaluates to *x*.
393+
394+ :param fp: the :any:`FroidurePin` instance.
395+ :type fp: FroidurePin
396+
397+ :param x: a possible element, or index of element, to factorise.
398+ :type x: Element | int
399+
400+ :returns: A word in the generators that evaluates to *x*.
401+ :rtype: list[int]
402+
403+ :raises LibsemigroupsError:
404+ if *x* is an ``Element`` and *x* does not belong to *fp*.
405+
406+ :raises LibsemigroupsError:
407+ if *x* is an :any:`int` and *x* is greater than or equal to :any:`FroidurePin.size`.
408+ )pbdoc" );
359409
360410 m.def (
361411 " froidure_pin_position" ,
@@ -875,6 +925,7 @@ if *x* is not an element.
875925 // Helper functions
876926 // //////////////////////////////////////////////////////////////////////
877927
928+ // Documented in the size_t overload.
878929 m.def (
879930 " froidure_pin_factorisation" ,
880931 [](FroidurePin_& fp, Element const & x) {
@@ -884,29 +935,6 @@ if *x* is not an element.
884935 py::arg (" x" ),
885936 R"pbdoc(
886937:sig=(fp: FroidurePin, x: Element | int) -> list[int]:
887- :only-document-once:
888-
889- Returns a word containing a factorisation (in the generators) of an
890- element.
891-
892- This function returns a word in the generators that equals the given element
893- *x*. The key difference between this function and :any:`minimal_factorisation`,
894- is that the resulting factorisation may not be minimal.
895-
896- :param fp: the :any:`FroidurePin` instance.
897- :type fp: FroidurePin
898-
899- :param x: a possible element, or index of element, to factorise.
900- :type x: Element | int
901-
902- :returns: Returns a word in the generators which evaluates to *x*.
903- :rtype: list[int]
904-
905- :raises LibsemigroupsError:
906- if *x* is an ``Element`` and *x* does not belong to *fp*.
907-
908- :raises LibsemigroupsError:
909- if *x* is an :any:`int` and *x* is greater than or equal to :any:`FroidurePin.size`.
910938)pbdoc" );
911939
912940 m.def (
@@ -918,28 +946,6 @@ is that the resulting factorisation may not be minimal.
918946 py::arg (" x" ),
919947 R"pbdoc(
920948:sig=(fp: FroidurePin, x: Element | int) -> list[int]:
921- :only-document-once:
922-
923- Returns a word containing a minimal factorisation (in the generators)
924- of an element.
925-
926- This function returns the short-lex minimum word (if any) in the generators
927- that evaluates to *x*.
928-
929- :param fp: the :any:`FroidurePin` instance.
930- :type fp: FroidurePin
931-
932- :param x: a possible element, or index of element, to factorise.
933- :type x: Element | int
934-
935- :returns: A word in the generators that evaluates to *x*.
936- :rtype: list[int]
937-
938- :raises LibsemigroupsError:
939- if *x* is an ``Element`` and *x* does not belong to *fp*.
940-
941- :raises LibsemigroupsError:
942- if *x* is an :any:`int` and *x* is greater than or equal to :any:`FroidurePin.size`.
943949)pbdoc" );
944950
945951 m.def (
@@ -1219,34 +1225,49 @@ This function returns the element of *fp* obtained by evaluating *w*.
12191225 // Helpers
12201226 // //////////////////////////////////////////////////////////////////////
12211227
1222- m.def (" froidure_pin_factorisation" ,
1223- [](FroidurePin_& fp, ElementStateful<FroidurePin_> const & x) {
1224- return froidure_pin::factorisation (fp, to_element (x));
1225- });
1228+ m.def (
1229+ " froidure_pin_factorisation" ,
1230+ [](FroidurePin_& fp, ElementStateful<FroidurePin_> const & x) {
1231+ return froidure_pin::factorisation (fp, to_element (x));
1232+ },
1233+ R"pbdoc(
1234+ :sig=(fp: FroidurePin, x: Element | int) -> list[int]:
1235+ )pbdoc" );
12261236
1227- m.def (" froidure_pin_factorisation" ,
1228- [](FroidurePin_& fp, Word const & x) {
1229- return froidure_pin::factorisation (fp, to_element (fp, x));
1230- });
1237+ m.def (
1238+ " froidure_pin_factorisation" ,
1239+ [](FroidurePin_& fp, Word const & x) {
1240+ return froidure_pin::factorisation (fp, to_element (fp, x));
1241+ },
1242+ R"pbdoc(
1243+ :sig=(fp: FroidurePin, x: Element | int) -> list[int]:
1244+ )pbdoc" );
12311245
1232- m.def (" froidure_pin_minimal_factorisation" ,
1233- [](FroidurePin_& fp, ElementStateful<FroidurePin_> const & x) {
1234- return froidure_pin::minimal_factorisation (fp, to_element (x));
1235- });
1246+ m.def (
1247+ " froidure_pin_minimal_factorisation" ,
1248+ [](FroidurePin_& fp, ElementStateful<FroidurePin_> const & x) {
1249+ return froidure_pin::minimal_factorisation (fp, to_element (x));
1250+ },
1251+ R"pbdoc(
1252+ :sig=(fp: FroidurePin, x: Element | int) -> list[int]:
1253+ )pbdoc" );
12361254
1237- m.def (" froidure_pin_minimal_factorisation" ,
1238- [](FroidurePin_& fp, Word const & x) {
1239- return froidure_pin::minimal_factorisation (fp,
1240- to_element (fp, x));
1241- });
1255+ m.def (
1256+ " froidure_pin_minimal_factorisation" ,
1257+ [](FroidurePin_& fp, Word const & x) {
1258+ return froidure_pin::minimal_factorisation (fp, to_element (fp, x));
1259+ },
1260+ R"pbdoc(
1261+ :sig=(fp: FroidurePin, x: Element | int) -> list[int]:
1262+ )pbdoc" );
12421263
12431264 m.def (" froidure_pin_to_element" ,
12441265 [](FroidurePin_& fp, word_type const & w) {
12451266 return from_element (fp, froidure_pin::to_element (fp, w));
12461267 });
12471268 }
12481269 } // bind_froidure_pin_stateful
1249- } // namespace
1270+ } // namespace
12501271
12511272 void init_froidure_pin (py::module & m) {
12521273 // TODO(0) uncomment bind_froidure_pin<HPCombiTransf<16>>(m, "Transf16");
0 commit comments