word_to_element

element_type libsemigroups::FroidurePin::word_to_element(word_type const&) const

Returns a copy of the element of this represented by the word w.

The parameter w must consist of non-negative integers less than FroidurePin::nrgens, or a LibsemigroupsException will be thrown. This member function returns a copy of the element of this obtained by evaluating w. This is equivalent to finding the product x of the generators FroidurePin::generator(w[i]).

A copy is returned instead of a reference, because the element of this corresponding to w may not yet have been enumerated.

See

FroidurePin::word_to_pos.