sort_generating_pairs(sort_free_function_type)¶
-
ToddCoxeter &
libsemigroups::congruence::ToddCoxeter
::
sort_generating_pairs
(sort_free_function_type func = shortlex_compare)¶ Sorts all existing generating pairs according to the binary function
func
.Additionally, if
this
was defined over a finitely presented semigroup, then the copy of the defining relations of that semigroup contained inthis
(if any) are also sorted according tofunc
.- Return
a reference to the object pointed to by
this
.- Warning
If add_pair is called after this function, then it may no longer be the case that the defining relations and generating pairs of
this
are sorted byfunc
.- See
- Parameters
func
: a value of type sort_function_type that defines a linear order on the relations in a ToddCoxeter instance.
- Exceptions
LibsemigroupsException
: if started() returnstrue
.