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.

Exceptions

This function guarantees not to throw a LibsemigroupsException.

Complexity

See warning.

See

equal_to(word_type const&, word_type const&).

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 or v contains a letter that does not belong to alphabet().

Returns

true if the strings u and v represent the same element of the finitely presented semigroup, and false otherwise.

virtual std::string libsemigroups::FpSemigroupInterface::normal_form(std::string const &w) = 0

Returns a normal form for a string.

If u and v represent the same element of the finitely presented semigroup represented by this, then normal_form(u) is guaranteed to equal normal_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.

Complexity

See warning.

See

normal_form(word_type const&).

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.

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.

Exceptions

This function guarantees not to throw a LibsemigroupsException.

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.

Returns

A uint64_t, the value of which equals the size of this if this number is finite, or POSITIVE_INFINITY in some cases if this number is not finite.