set_inverses

void libsemigroups::FpSemigroup::set_inverses(std::string const &a)

Set the inverses of letters in alphabet().

The letter in a with index i is the inverse of the letter in alphabet() with index i.

Complexity

\(O(n)\) where \(n\) is alphabet().size().

See

set_identity(std::string const&).

Parameters

a – a string of length alphabet().size().

Throws

LibsemigroupsException – if any of the following apply:

  • a is empty;

  • alphabet() is empty;

  • no identity has been defined using set_identity();

  • the length of a is not equal to alphabet().size();

  • the letters in a are not exactly those in alphabet() (perhaps in a different order).

Returns

(None)