final_letter

letter_type libsemigroups::FroidurePinBase::final_letter(element_index_type pos) const

Returns the last letter of the element in position pos.

This member function returns the final letter of the element in position pos of the semigroup, which is the index of the generator corresponding to the final letter of the element.

Note that FroidurePin::generator[FroidurePin::final_letter(pos)] is only equal to FroidurePin::at(FroidurePin::final_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.