string_to_word¶
-
word_type libsemigroups::fpsemigroup::KnuthBendix::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