add_pair(word_type const&, word_type const&)

void libsemigroups::congruence::KnuthBendix::add_pair(word_type const &u, word_type const &v)

Add a generating pair to the congruence.

Return

(None)

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.

Exceptions
  • 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.