contains¶
-
inline virtual bool libsemigroups::CongruenceByPairsHelper::contains(word_type const &u, word_type const &v)¶
Check if a pair of words belongs to the congruence.
- 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.
- Throws
LibsemigroupsException – if
u
orv
contains a letter that is out of bounds.std::bad_alloc – if the (possibly infinite) computation uses all the available memory.
- Returns
true
if the wordsu
andv
belong to the same congruence class, andfalse
otherwise.