libsemigroups  v3.0.0
C++ library for semigroups and monoids
Loading...
Searching...
No Matches

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).

Inheritance diagram for MinimalRepOrc:
[legend]

Public Member Functions

 MinimalRepOrc ()
 Default constructor.
 
MinimalRepOrcinit ()
 Reinitialize an existing MinimalRepOrc object.
 
size_t target_size () const noexcept
 Get the current target size.
 
MinimalRepOrctarget_size (size_t val) noexcept
 Set the target size.
 
Sims1::word_graph_type word_graph () const
 Get the word graph.
 
- Public Member Functions inherited from SimsSettings< MinimalRepOrc >
 SimsSettings ()
 
 SimsSettings (SimsSettings &&that)
 
 SimsSettings (SimsSettings const &that)
 
 SimsSettings (SimsSettings< OtherSubclass > const &that)
 Construct from SimsSettings with different subclass.
 
MinimalRepOrcadd_excluded_pair (Iterator1 first1, Iterator2 last1, Iterator3 first2, Iterator4 last2)
 Add an excluded pair via iterators.
 
MinimalRepOrcadd_excluded_pair_no_checks (Iterator1 first1, Iterator2 last1, Iterator3 first2, Iterator4 last2)
 Add an excluded pair via iterators (no checks).
 
MinimalRepOrcadd_included_pair (Iterator1 first1, Iterator2 last1, Iterator3 first2, Iterator4 last2)
 Add an included pair via iterators (no checks).
 
MinimalRepOrcadd_included_pair_no_checks (Iterator1 first1, Iterator2 last1, Iterator3 first2, Iterator4 last2)
 Add an included pair via iterators.
 
MinimalRepOrcadd_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.
 
MinimalRepOrccbegin_long_rules (size_t pos)
 Set the beginning of the long rules (position).
 
MinimalRepOrccbegin_long_rules (std::vector< word_type >::const_iterator it)
 Set the beginning of the long rules (iterator).
 
MinimalRepOrcclear_excluded_pairs ()
 Clear the set of excluded words.
 
MinimalRepOrcclear_included_pairs ()
 Clear the set of included pairs.
 
MinimalRepOrcclear_long_rules ()
 Clear the set of long rules.
 
MinimalRepOrcclear_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.
 
MinimalRepOrcidle_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.
 
MinimalRepOrcinit ()
 Reinitialize an existing SimsSettings object.
 
MinimalRepOrcinit (SimsSettings< OtherSubclass > const &that)
 Initialize from SimsSettings with different subclass.
 
MinimalRepOrclong_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.
 
MinimalRepOrcnumber_of_threads (size_t val)
 Set the number of threads.
 
SimsSettingsoperator= (SimsSettings &&that)
 
SimsSettingsoperator= (SimsSettings const &that)
 
Presentation< word_type > const & presentation () const noexcept
 Get the presentation over which the congruences produced by an instance are defined.
 
MinimalRepOrcpresentation (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
 
SimsStatsstats () 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

- Public Types inherited from SimsSettings< MinimalRepOrc >
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.
 

Member Function Documentation

◆ init()

MinimalRepOrc & init ( )
inline

This function puts a MinimalRepOrc object back into the same state as if it had been newly default constructed.

Returns
A reference to this.
Exceptions
This function guarantees not to throw a LibsemigroupsException.

◆ target_size() [1/2]

size_t target_size ( ) const
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.

Returns
A value of type size_t.
Exceptions
This function is noexcept and is guaranteed never to throw.

◆ target_size() [2/2]

MinimalRepOrc & target_size ( size_t val)
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.

Parameters
valthe target size.
Returns
A reference to this.
Exceptions
This function is noexcept and is guaranteed never to throw.

◆ word_graph()

Sims1::word_graph_type word_graph ( ) const
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:

RepOrc(*this)
.max_nodes(best)
size_t target_size() const noexcept
Get the current target size.
Definition sims.hpp:2236
For computing small degree transformation representations of a finite semigroup or monoid.
Definition sims.hpp:1989
RepOrc & max_nodes(size_t val) noexcept
Set the maximum number of nodes.
Definition sims.hpp:2091
RepOrc & target_size(size_t val) noexcept
Set the target size.
Definition sims.hpp:2121
Sims1::word_graph_type word_graph() const
Get the word_graph.
RepOrc & min_nodes(size_t val) noexcept
Set the minimum number of nodes.
Definition sims.hpp:2062

where best is initially target_size, until the returned WordGraph is empty, and then the penultimate WordGraph is returned (if any).

Returns
A value of type WordGraph<uint32_t>.
Exceptions
This function guarantees not to throw a LibsemigroupsException.
Warning
The return value of this function is recomputed every time it is called.
If the return value of number_of_threads is greater than 1, then the value returned by this function is non-deterministic, and may vary even for the same parameters.

The documentation for this class was generated from the following file: