This page contains the documentation of the various member functions of the KnuthBendix class that can be used to access the state of an instance.
Those functions with the prefix current_ do not perform any further enumeration.
template<typename Rewriter = detail::RewriteTrie, typename ReductionOrder = ShortLexCompare>
| WordGraph< uint32_t > const & gilman_graph |
( |
| ) |
|
This function returns the Gilman WordGraph of the system.
The Gilman WordGraph is a digraph where the labels of the paths from the initial node (corresponding to the empty word) correspond to the shortlex normal forms of the semigroup elements.
The semigroup is finite if the graph is cyclic, and infinite otherwise.
- Returns
- A const reference to a WordGraph.
- Exceptions
- This function guarantees not to throw a LibsemigroupsException.
- Warning
- This will terminate when the KnuthBendix instance is reduced and confluent, which might be never.
- See also
- number_of_classes, and normal_forms.
template<typename Rewriter = detail::RewriteTrie, typename ReductionOrder = ShortLexCompare>
| size_t number_of_pending_rules |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
This function returns the number of pending rules in the system. All rules in the system are either active or pending. Active rules are used to perform rewriting, but pending rules are not, until they have been processed and become active rules. For example, when a KnuthBendix object is constructed from a presentation, the rules in the presentation are initially pending. This is to avoid incurring the cost of processing the pending rules before absolutely necessary.
- Returns
- The number of pending rules.
- Exceptions
- This function is noexcept and is guaranteed never to throw.
- Complexity
- Constant.
template<typename Rewriter = detail::RewriteTrie, typename ReductionOrder = ShortLexCompare>
| KnuthBendixImpl & process_pending_rules |
( |
| ) |
|
|
inline |
This function processes any pending rules in the system. All rules in the system are either active or pending. Active rules are used to perform rewriting, but pending rules are not, until they have been processed and become active rules. For example, when a KnuthBendix object is constructed from a presentation, the rules in the presentation are initially pending. This is to avoid incurring the cost of processing the pending rules before absolutely necessary.
- Returns
- A reference to *this.
- Exceptions
- This function guarantees not to throw a LibsemigroupsException.