![]() |
libsemigroups
v3.0.0
C++ library for semigroups and monoids
|
This page contains the documentation of the various member functions of the ToddCoxeter class that can be used to access the state of an instance.
Those functions with the prefix current_
do not perform any further enumeration.
Functions | |
Forest const & | current_spanning_tree () const noexcept |
Get the current possible spanning tree of the underlying word graph. | |
word_graph_type const & | current_word_graph () const noexcept |
Get the current word graph. | |
bool | is_standardized () const |
Check if the word graph is currently standardized with respect to any order. | |
bool | is_standardized (Order val) const |
Check if the word graph is currently standardized with respect to a given order. | |
Forest const & | spanning_tree () |
Get the spanning tree of the underlying word graph. | |
Order | standardization_order () const noexcept |
Get the current standardization order of the underlying word graph. | |
word_graph_type const & | word_graph () |
Get the word graph after performing a full congruence enumeration. | |
|
inlinenoexcept |
This function returns a const reference to the current value of a possible spanning tree (a Forest) for the underlying WordGraph (returned by current_word_graph). This spanning tree is only populated during calls to standardize and as such might contain nothing, or a spanning tree of a previous value of current_word_graph. Some care should be used with the return value of this function, and it might be better to use the function spanning_tree, which has none of these limitation.
If finished returns true
, and standardize(Order) has been called prior to a call to this function, then the returned Forest will represent a valid spanning tree for the WordGraph returned by current_word_graph or word_graph.
noexcept
and is guaranteed never to throw.
|
inlinenoexcept |
In some sense, the purpose of the Todd-Coxeter algorithm is to produce a WordGraph of the action of a set of generators on the classes of a congruence. This function can be used to obtain a reference to that WordGraph as it currently exists within a ToddCoxeter instance. This function does not trigger any enumeration.
The WordGraph returned by this function may be in a rather complicated state. No guarantees are given: about the values of the active nodes (i.e. they may be any non-negative integers in any order); that the number of nodes (including those that are inactive) should coincide with the number of active nodes; that the graph is complete; or that the graph is compatible with the relations of the presentation or with the generating_pairs.
The functions standardize(Order) and shrink_to_fit can be used to modify the returned word graph in-place to have (possibly) more reasonable characteristics.
noexcept
and is guaranteed never to throw. bool is_standardized | ( | ) | const |
This function returns true
if the current_word_graph has been standardized with respect to the any Order other than Order::none.
bool is_standardized | ( | Order | val | ) | const |
This function returns true
if the current_word_graph has been standardized with respect to the order val
; and false
if not.
val | the Order to check for. |
Forest const & spanning_tree | ( | ) |
This function returns a const reference to a spanning tree (a Forest) for the underlying WordGraph (returned by word_graph) with the nodes appearing in short-lex order. This function triggers a full congruence enumeration.
|
inlinenoexcept |
This function returns the standardization order currently used in the underlying word graph. The return value of this function will be the argument of the most recent call to standardize(Order); or Order::none.
The return value of this function indicates the following:
noexcept
and is guaranteed never to throw. word_graph_type const & word_graph | ( | ) |
In some sense, the purpose of the Todd-Coxeter algorithm is to produce a WordGraph of the action of a set of generators on the classes of a congruence. This function can be used to obtain a reference to that WordGraph instance. This function triggers a full enumeration.
The WordGraph returned by this function may be in a rather complicated state. The active nodes (and nodes) will be \(\{0, \ldots, n - 1\}\) where \(n\) is the number of classes in the congruence if presentation contains the empty word; or the number of classes plus one if presentation does not contain the empty word. The returned WordGraph is also short-lex standardized. The returned WordGraph will usually be complete and compatible with the relations of the presentation and with the generating_pairs. The WordGraph may not be complete or compatible for some values of the settings. For example, if the setting lower_bound is used but is not the same as the number of classes in the congruence, then the WordGraph returned by this function may not be compatible with the relations of presentation or generating_pairs.