const_contains

virtual tril libsemigroups::congruence::ToddCoxeter::const_contains(word_type const &u, word_type const &v) const

Check if a pair of words is known to belong to the congruence.

Complexity

Linear in u.size() + v.size().

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 u or v contains a letter that is out of bounds.

Returns