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 fpsemigroup::KnuthBendix.This class is used to represent a string rewriting system defining a finitely presented monoid or semigroup.
See also
- 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.number_of_active_rules(); // 31 kb.confluent(); // true
Public Types¶
Type of an const iterator to a normal form. |
|
The type of the return value of |
|
This type contains various enums for specifying certain options to a |
|
Values for specifying how to measure the length of an overlap. |
Constructors¶
Default constructor. |
|
Constructs from a |
|
Copy constructor. |
|
Deleted. |
|
Constructs from a shared pointer to a |
Deleted constructors¶
Deleted. |
|
Deleted. |
Member functions¶
Returns a copy of the active rules. |
|
Returns a forward iterator pointing at the first normal form with length in a given range. |
|
Returns a forward iterator pointing at the first normal form with length in a given range. |
|
Returns a forward iterator pointing to one after the last normal form. |
|
Check confluence of the current rules. |
|
Returns whether or not the empty string belongs in the system. |
|
Returns the Gilman digraph. |
|
Run the Knuth-Bendix by considering all overlaps of a given length. |
|
Returns the current number of active rules in the |
|
Returns the number of normal forms with length in a given range. |
|
This friend function allows a |
|
Rewrite a word in-place. |
|
Rewrite a word. |
Settings¶
Set the interval at which confluence is checked. |
|
Set the maximum length of overlaps to be considered. |
|
Set the maximum number of rules. |
|
Set the overlap policy. |
Member functions and types inherited from FpSemigroupInterface¶
Add a rule using a |
|
Add a rule using a |
|
|
Add a rule using two |
Add a rule using two std::string const references. |
|
Add a rule using two |
|
Add rules from a |
|
Add rules in a vector. |
|
Returns a const reference to the alphabet. |
|
Returns the |
|
Returns an iterator pointing to the first rule. |
|
Returns an iterator pointing one past the last rule. |
|
Convert a char to a |
|
Type for characters. |
|
Type for const iterators to the defining rules. |
|
|
Check if two words represent the same element. |
Check if two strings represent the same element. |
|
Check if two words represent the same element. |
|
Returns an isomorphic |
|
Check if an isomorphic |
|
Check if an identity has been set. |
|
Returns the identity (if any). |
|
Returns the inverses (if any). |
|
Check if the finitely presented semigroup is obviously finite. |
|
Check if the finitely presented semigroup is obviously infinite. |
|
Returns a normal form for a |
|
Returns a normal form for a string. |
|
Returns a normal form for a |
|
Returns the number of rules. |
|
Type for rules. |
|
Set the size of the alphabet. |
|
Set the alphabet of the finitely presented semigroup. |
|
Set a character in |
|
Set a character in |
|
Set the inverses of letters in |
|
Returns the size of the finitely presented semigroup. |
|
Convert a string to a |
|
Type for strings. |
|
Returns a string containing GAP commands for defining a finitely presented semigroup. |
|
Convert a |
|
Validates a letter specified by a |
|
Validates a letter specified by an integer. |
|
Validates a word given by a std::string. |
|
Validates a word given by a |
|
Convert a |
Member functions inherited from Runner¶
Check if the runner is dead. |
|
Check if |
|
Stop |
|
Check if it is time to report. |
|
Get the minimum elapsed time between reports. |
|
Set the minimum elapsed time between reports. |
|
Set the minimum elapsed time between reports. |
|
Report why |
|
Run until |
|
Run for a specified amount of time. |
|
Run for a specified amount of time. |
|
Run until a nullary predicate returns |
|
Run until a nullary predicate returns |
|
Check if currently running. |
|
Check if the runner is currently running for a particular length of time. |
|
Check if the runner is currently running until a nullary predicate returns |
|
Check if |
|
Check if the runner is stopped. |
|
Check if the runner was, or should, stop because of the argument for |
|
Check if the amount of time passed to |