fpsemigroup::KnuthBendix¶
-
class
KnuthBendix
: public libsemigroups::FpSemigroupInterface¶ Defined in
knuth-bendix.hpp
.On this page we describe the functionality relating to the Knuth-Bendix algorithm for semigroups and monoids that is available in
libsemigroups
. This page contains a details of the member functions of the class libsemigroups::fpsemigroup::KnuthBendix.This class is used to represent a string rewriting system defining a finitely presented monoid or semigroup.
- See
- Example
KnuthBendix kb; kb.set_alphabet("abc"); kb.add_rule("aaaa", "a"); kb.add_rule("bbbb", "b"); kb.add_rule("cccc", "c"); kb.add_rule("abab", "aaa"); kb.add_rule("bcbc", "bbb"); !kb.confluent(); // true kb.run(); kb.nr_active_rules(); // 31 kb.confluent(); // true
Public Types¶
Constructors¶
Validation¶
Initialisation¶
- add_rule(rule_type)
- add_rule(std::initializer_list<size_t>, std::initializer_list<size_t>)
- add_rule(std::string const&, std::string const&)
- add_rule(word_type const&, word_type const&)
- add_rules(FroidurePinBase&)
- add_rules(std::vector<rule_type> const&)
- set_alphabet(size_t)
- set_alphabet(std::string const&)
- set_identity(letter_type)
- set_identity(std::string const&)
- set_inverses
Attributes¶
Settings¶
Running¶
Operators¶
- equal_to(std::initializer_list<letter_type>, std::initializer_list<letter_type>)
- equal_to(std::string const&, std::string const&)
- equal_to(word_type const&, word_type const&)
- normal_form(std::initializer_list<letter_type>)
- normal_form(std::string const&)
- normal_form(word_type const&)
- rewrite(std::string *) const
- rewrite(std::string) const