product_by_reduction

virtual element_index_type libsemigroups::FroidurePinBase::product_by_reduction(element_index_type, element_index_type) const = 0

Returns the position in this of the product of this->at(i) and this->at(j) by following a path in the Cayley graph.

The values i and j must be less than FroidurePin::current_size, or a LibsemigroupsException will be thrown. This member function returns the position FroidurePin::element_index_type in the semigroup of the product of this->at(i) and this->at(j) elements by following the path in the right Cayley graph from i labelled by the word this->minimal_factorisation(j) or, if this->minimal_factorisation(i) is shorter, by following the path in the left Cayley graph from j labelled by this->minimal_factorisation(i).