next_relation¶
-
virtual void
libsemigroups::FroidurePinBase::next_relation(word_type &relation) = 0¶ This member function changes
relationin-place to contain the next relation of the presentation definingthis.This member function changes
relationin-place so that one of the following holds:relationis 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;relationis 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]]
relationis 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
relationcorrespond 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.