word_to_pos¶
-
element_index_type
libsemigroups::FroidurePinBase::word_to_pos(word_type const &w) const¶ Returns the position in the semigroup corresponding to the element represented by the word
w.The parameter
wmust consist of non-negative integers less than FroidurePin::nr_generators, or a LibsemigroupsException will be thrown. This member function returns the position inthisof the element obtained by evaluatingw. This member function does not perform any enumeration of the semigroup, and will return libsemigroups::UNDEFINED if the position of the element ofthiscorresponding towcannot be determined.This is equivalent to finding the product
xof the generators FroidurePin::generator(w[i]) and then calling FroidurePin::position_current with argumentx.