string_to_word

word_type libsemigroups::FpSemigroup::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.

Return

a libsemigroups::word_type.

Complexity.

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

Parameters
  • w: the string to convert.

Exceptions