active_rules

std::vector<rule_type> libsemigroups::fpsemigroup::KnuthBendix::active_rules() const

Returns a copy of the active rules of the KnuthBendix instance.

This member function returns a vector consisting of the pairs of strings which represent the rules of the KnuthBendix instance. The first entry in every such pair is greater than the second according to the reduction ordering of the KnuthBendix instance. The rules are sorted according to the reduction ordering used by the rewriting system, on the first entry.

Return

A copy of the currently active rules, a value of type std::vector<rule_type>.

Complexity

\(O(n)\) where \(n\) is the sum of the lengths of the words in rules of copy.

Parameters

(None)