class_index_to_word¶
-
word_type
libsemigroups::CongruenceInterface
::
class_index_to_word
(class_index_type i)¶ If the congruence, that an object of this type represents, is defined over a semigroup with generators \(A\), then this function defines a injective function from \(\{0, 1, \ldots, n - 1\}\), where \(n\) is the number of classes, or to the non-negative integers \(\{0, 1, \ldots\}\) if
this
has infinitely many classes, to a fixed set of words over \(A\) representing distinct congruences classes.- Return
The word representing the
i-th
class of the congruence- Complexity
See warning.
- Warning
The function for finding the structure of a congruence may be non-deterministic, or undecidable, and this function may never return a result.
- Note
CongruenceInterface::word_to_class_index and CongruenceInterface::class_index_to_word are mutually inverse functions.
- Parameters
i
: the index of the class whose representative we want to find, a value of type libsemigroups::word_type.
- Exceptions
LibsemigroupsException
: if the specified class indexi
exceeds the total number of classes.std::bad_alloc
: if the (possibly infinite) computation uses all the available memory.