Pure virtual member functions¶
This page contains information about the pure virtual member functions of the FpSemigroupInterface
class.

virtual bool libsemigroups::FpSemigroupInterface::equal_to(std::string const &u, std::string const &v) = 0¶
Check if two strings represent the same element.
 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 string over the alphabet of the finitely presented semigroup.
v – a string over the alphabet of the finitely presented semigroup.
 Throws
LibsemigroupsException – if
u
orv
contains a letter that does not belong to alphabet().(None) – This function guarantees not to throw a
LibsemigroupsException
.
 Returns
true
if the stringsu
andv
represent the same element of the finitely presented semigroup, andfalse
otherwise.

virtual std::string libsemigroups::FpSemigroupInterface::normal_form(std::string const &w) = 0¶
Returns a normal form for a string.
If
u
andv
represent the same element of the finitely presented semigroup represented bythis
, thennormal_form(u)
is guaranteed to equalnormal_form(v)
. No further guarantees are given, the return value of normal_form() depends on the implementation and may vary between finitely presented semigroups defined in precisely the same way.See also
 Complexity
See warning.
Warning
The function for finding the structure of a finitely presented semigroup may be nondeterministic, or since the problem is undecidable in general, this function may never return a result.
 Parameters
w – the word whose normal form we want to find. The parameter
w
must be a std::string consisting of letters in alphabet(). Throws
LibsemigroupsException – if
w
contains a letter that is not in alphabet(), or the object has not been fully initialised. Returns
The normal form of the parameter
w
, a value of type std::string.

virtual uint64_t libsemigroups::FpSemigroupInterface::size() = 0¶
Returns the size of the finitely presented semigroup.
 Complexity
See warning.
 Parameters
(None)
Warning
The problem of determining the return value of this function is undecidable in general, and this function may never terminate.
 Throws
(None) – This function guarantees not to throw a
LibsemigroupsException
. Returns
A
uint64_t
, the value of which equals the size ofthis
if this number is finite, or POSITIVE_INFINITY in some cases if this number is not finite.