rewrite(std::string) const

inline std::string libsemigroups::fpsemigroup::KnuthBendix::rewrite(std::string w) const

Rewrite a word.

Rewrites a copy of the word w rewritten according to the current rules in the KnuthBendix instance.

Parameters

w – the word to rewrite.

Returns

A copy of the argument w after it has been rewritten.