![]() |
libsemigroups
v3.0.0
C++ library for semigroups and monoids
|
Defined in sims.hpp
.
This class is a helper for Sims1, calling the word_graph member function attempts to find a right congruence, represented as an WordGraph, with the minimum possible number of nodes such that the action of the semigroup or monoid defined by the presentation consisting of its presentation on the nodes of the WordGraph corresponds to a semigroup of size target_size.
If no such WordGraph can be found, then an empty WordGraph is returned (with 0
nodes and 0
edges).
Public Member Functions | |
MinimalRepOrc () | |
Default constructor. | |
MinimalRepOrc & | init () |
Reinitialize an existing MinimalRepOrc object. | |
size_t | target_size () const noexcept |
Get the current target size. | |
MinimalRepOrc & | target_size (size_t val) noexcept |
Set the target size. | |
Sims1::word_graph_type | word_graph () const |
Get the word graph. | |
![]() | |
SimsSettings () | |
SimsSettings (SimsSettings &&that) | |
SimsSettings (SimsSettings const &that) | |
SimsSettings (SimsSettings< OtherSubclass > const &that) | |
Construct from SimsSettings with different subclass. | |
MinimalRepOrc & | add_excluded_pair (Iterator1 first1, Iterator2 last1, Iterator3 first2, Iterator4 last2) |
Add an excluded pair via iterators. | |
MinimalRepOrc & | add_excluded_pair_no_checks (Iterator1 first1, Iterator2 last1, Iterator3 first2, Iterator4 last2) |
Add an excluded pair via iterators (no checks). | |
MinimalRepOrc & | add_included_pair (Iterator1 first1, Iterator2 last1, Iterator3 first2, Iterator4 last2) |
Add an included pair via iterators (no checks). | |
MinimalRepOrc & | add_included_pair_no_checks (Iterator1 first1, Iterator2 last1, Iterator3 first2, Iterator4 last2) |
Add an included pair via iterators. | |
MinimalRepOrc & | add_pruner (Func &&func) |
Add a pruner to the search tree. | |
std::vector< word_type >::const_iterator | cbegin_long_rules () const noexcept |
Get the pointer to the first long rule. | |
MinimalRepOrc & | cbegin_long_rules (size_t pos) |
Set the beginning of the long rules (position). | |
MinimalRepOrc & | cbegin_long_rules (std::vector< word_type >::const_iterator it) |
Set the beginning of the long rules (iterator). | |
MinimalRepOrc & | clear_excluded_pairs () |
Clear the set of excluded words. | |
MinimalRepOrc & | clear_included_pairs () |
Clear the set of included pairs. | |
MinimalRepOrc & | clear_long_rules () |
Clear the set of long rules. | |
MinimalRepOrc & | clear_pruners () |
Clear the set of pruners. | |
std::vector< word_type > const & | excluded_pairs () const noexcept |
Get the set of pairs that must be excluded from every congruence. | |
size_t | idle_thread_restarts () const noexcept |
Get the idle thread restart attempt count. | |
MinimalRepOrc & | idle_thread_restarts (size_t val) |
Set the idle thread restart attempt count. | |
std::vector< word_type > const & | included_pairs () const noexcept |
Get the set of pairs that must be included in every congruence. | |
MinimalRepOrc & | init () |
Reinitialize an existing SimsSettings object. | |
MinimalRepOrc & | init (SimsSettings< OtherSubclass > const &that) |
Initialize from SimsSettings with different subclass. | |
MinimalRepOrc & | long_rule_length (size_t val) |
Set the length of a long rule. | |
size_t | number_of_long_rules () const noexcept |
Returns the number of rules marked as long rules. | |
size_t | number_of_threads () const noexcept |
Get the number of threads. | |
MinimalRepOrc & | number_of_threads (size_t val) |
Set the number of threads. | |
SimsSettings & | operator= (SimsSettings &&that) |
SimsSettings & | operator= (SimsSettings const &that) |
Presentation< word_type > const & | presentation () const noexcept |
Get the presentation over which the congruences produced by an instance are defined. | |
MinimalRepOrc & | presentation (Presentation< word_type > const &p) |
Set the presentation over which the congruences produced by an instance are defined. | |
auto const & | pruners () const noexcept |
Get all active pruners of the search tree. | |
SimsSettings const & | settings () const noexcept |
SimsStats & | stats () const noexcept |
Get the current stats object. | |
void | throw_if_letter_not_in_alphabet (Iterator1 first, Iterator2 last) const |
Throws if any letter in a range is out of bounds. | |
Additional Inherited Members | |
![]() | |
using | label_type |
Type for the labels in the associated WordGraph objects. | |
using | letter_type |
Type for letters in the underlying presentation. | |
using | node_type |
Type for the nodes in the associated WordGraph objects. | |
using | size_type |
The size_type of the associated WordGraph objects. | |
using | word_graph_type |
The type of the associated WordGraph objects. | |
|
inline |
This function puts a MinimalRepOrc object back into the same state as if it had been newly default constructed.
this
.
|
inlinenodiscardnoexcept |
This function returns the current value for the target size, i.e. the desired size of the transformation semigroup corresponding to the WordGraph returned by the function word_graph.
size_t
.noexcept
and is guaranteed never to throw.
|
inlinenoexcept |
This function sets the target size, i.e. the desired size of the transformation semigroup corresponding to the WordGraph returned by the function word_graph.
val | the target size. |
this
.noexcept
and is guaranteed never to throw.
|
nodiscard |
This function attempts to find a right congruence, represented as an WordGraph, with the minimum possible number of nodes such that the action of the semigroup or monoid defined by its presentation on the nodes of the WordGraph corresponds to a semigroup of size target_size.
If no such WordGraph can be found, then an empty WordGraph is returned (with 0
nodes and 0
edges).
The algorithm implemented by this function repeatedly runs:
where best
is initially target_size, until the returned WordGraph is empty, and then the penultimate WordGraph is returned (if any).
WordGraph<uint32_t>
.1
, then the value returned by this function is non-deterministic, and may vary even for the same parameters.