nr_classes¶
-
size_t libsemigroups::CongruenceByPairsHelper::nr_classes()¶
Computes the total number of classes in the congruence represented by an instance of this type.
- Complexity
See warning.
- Parameters
(None)
Warning
The problem of determining the number of classes of a congruence over a finitely presented semigroup is undecidable in general, and this function may never terminate.
- Throws
std::bad_alloc – if the (possibly infinite) computation uses all the available memory.
- Returns
The number of congruences classes of
this
if this number is finite, or libsemigroups::POSITIVE_INFINITY in some cases ifthis
number is not finite.