add_pair(word_type const&, word_type const&)¶
-
void libsemigroups::congruence::ToddCoxeter::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
u
andv
are identical wordsif
this->has_parent_froidure_pin()
and the wordsu
andv
represent 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
u
orv
contains a letter that is out of bounds.this->started()
returnstrue
indicating that the underlying algorithm has been applied (partially or fully) to the data structure.
- Returns
(None)