string_to_word

word_type libsemigroups::CongruenceWrapper::string_to_word(std::string const &w) const

Convert a string to a libsemigroups::word_type representing the same element of the finitely presented semigroup represented by this.

Complexity.

\(O(n)\) where \(n\) is the length of w.

Parameters

w – the string to convert.

Throws

LibsemigroupsException – if w contains any characters not in alphabet().

Returns

a libsemigroups::word_type.