add_pair(word_type const&, word_type const&)

void libsemigroups::CongruenceInterface::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:

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:

  1. the number of generators has not yet been set (set_nr_generators)

  2. if u or v contains a letter that is out of bounds.

  3. this->started() returns true indicating that the underlying algorithm has been applied (partially or fully) to the data structure.

Returns

(None)