normal_form(std::string const&)ΒΆ
-
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.- Return
the normal form of the parameter
w
, a value of type std::string.- Complexity
See warning.
- Warning
The function for finding the structure of a finitely presented semigroup may be non-deterministic, or since the problem is undecidable in general, this function may never return a result.
- See
- Parameters
w
: the word whose normal form we want to find. The parameterw
must be a std::string consisting of letters in alphabet().
- Exceptions
LibsemigroupsException
: ifw
contains a letter that is not in FpSemigroupInterface::alphabet(), or the object has not been fully initialised.