add_pair(word_type const&, word_type const&)¶
-
void libsemigroups::Congruence::add_pair(word_type const &u, word_type const &v)¶
Add a generating pair to the congruence.
- Complexity
Linear in
u.size() + v.size().
Note
In some circumstances this function does not do anything. These are:
if
uandvare identical wordsif
this->has_parent_froidure_pin()and the wordsuandvrepresent the same element ofthis->parent_froidure_pin().
- Parameters
u – a word (vector of integers) over the generators of the semigroup.
v – a word (vector of integers) over the generators of the semigroup.
- Throws
LibsemigroupsException – If any of the following hold:
the number of generators has not yet been set (set_nr_generators)
if
uorvcontains a letter that is out of bounds.this->started()returnstrueindicating that the underlying algorithm has been applied (partially or fully) to the data structure.
- Returns
(None)