less¶
-
bool
libsemigroups::CongruenceByPairsHelper::less(word_type const &u, word_type const &v)¶ This function returns
trueif the congruence class ofvis less than the class ofvin a total ordering of congruence classes.- Return
trueif the class ofuis less than that of.- Complexity
See warning.
- Warning
The problem of determining the return value of this function is undecidable in general, and this function may never terminate.
- Possible Implementation
bool less(word_type const& u, word_type const& v) { return word_to_class_index(u) < word_to_class_index(v); }
- 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.