contains¶
-
bool
libsemigroups::congruence::ToddCoxeter::contains(word_type const&, word_type const&) override¶ Check if a pair of words belongs to the congruence.
- Return
trueif the wordsuandvbelong to the same congruence class, andfalseotherwise.- Complexity
See warning.
- Warning
The problem of determining the return value of this function is undecidable in general, and this function may never terminate.
- 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: ifuorvcontains a letter that is out of bounds.std::bad_alloc: if the (possibly infinite) computation uses all the available memory.