next_relation¶
-
void
libsemigroups::FroidurePin
::
next_relation
(word_type &relation)¶ This member function changes
relation
in-place to contain the next relation of the presentation definingthis
.This member function changes
relation
in-place so that one of the following holds:relation
is a vector consisting of a libsemigroups::letter_type and a libsemigroups::letter_type such that FroidurePin::generator(relation
[0
]) == FroidurePin::generator(relation
[1
]), i.e. if the semigroup was defined with duplicate generators;relation
is a vector consisting of a libsemigroups::element_index_type, libsemigroups::letter_type, and libsemigroups::element_index_type such thatthis[relation[0]] * FroidurePin::generator(relation[1]) == this[relation[2]]
relation
is empty if there are no more relations.
FroidurePin::next_relation is guaranteed to output all relations of length 2 before any relations of length 3. If called repeatedly after FroidurePin::reset_next_relation, and until relation is empty, the values placed in
relation
correspond to a length-reducing confluent rewriting system that defines the semigroup.This member function can be used in conjunction with FroidurePin::factorisation to obtain a presentation defining the semigroup.