first_letter¶
-
inline letter_type libsemigroups::FroidurePin::first_letter(element_index_type pos) const¶
Returns the first letter of the element in position
pos
.This member function returns the first letter of the element in position
pos
of the semigroup, which is the index of the generator corresponding to the first letter of the element.Note that FroidurePin::generator[FroidurePin::first_letter(
pos
)] is only equal to FroidurePin::at(FroidurePin::first_letter(pos
)) if there are no duplicate generators.The parameter
pos
must be a valid position of an already enumerated element of the semigroup, or a LibsemigroupsException will be thrown.