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, of the semigroup or monoid defined by its presentation with the following properties:

If no such WordGraph can be found, then an empty WordGraph is returned (with 0 nodes and 0 edges).

Inheritance diagram for RepOrc:
[legend]

Public Member Functions

 RepOrc ()
 Default constructor.
 
template<typename OtherSubclass>
 RepOrc (SimsSettings< OtherSubclass > const &s)
 Construct from Sims1, Sims2 or MinimalRepOrc.
 
RepOrcinit ()
 Reinitialize an existing RepOrc object.
 
template<typename OtherSubclass>
RepOrcinit (SimsSettings< OtherSubclass > const &s)
 Initialize an existing RepOrc object from Sims1, Sims2 or MinimalRepOrc.
 
size_t max_nodes () const noexcept
 Get the current maximum number of nodes.
 
RepOrcmax_nodes (size_t val) noexcept
 Set the maximum number of nodes.
 
size_t min_nodes () const noexcept
 Get the current minimum number of nodes.
 
RepOrcmin_nodes (size_t val) noexcept
 Set the minimum number of nodes.
 
size_t target_size () const noexcept
 Get the current target size.
 
RepOrctarget_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< RepOrc >
 SimsSettings ()
 
 SimsSettings (SimsSettings &&that)
 
 SimsSettings (SimsSettings const &that)
 
 SimsSettings (SimsSettings< OtherSubclass > const &that)
 Construct from SimsSettings with different subclass.
 
RepOrcadd_excluded_pair (Iterator1 first1, Iterator2 last1, Iterator3 first2, Iterator4 last2)
 Add an excluded pair via iterators.
 
RepOrcadd_excluded_pair_no_checks (Iterator1 first1, Iterator2 last1, Iterator3 first2, Iterator4 last2)
 Add an excluded pair via iterators (no checks).
 
RepOrcadd_included_pair (Iterator1 first1, Iterator2 last1, Iterator3 first2, Iterator4 last2)
 Add an included pair via iterators (no checks).
 
RepOrcadd_included_pair_no_checks (Iterator1 first1, Iterator2 last1, Iterator3 first2, Iterator4 last2)
 Add an included pair via iterators.
 
RepOrcadd_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.
 
RepOrccbegin_long_rules (size_t pos)
 Set the beginning of the long rules (position).
 
RepOrccbegin_long_rules (std::vector< word_type >::const_iterator it)
 Set the beginning of the long rules (iterator).
 
RepOrcclear_excluded_pairs ()
 Clear the set of excluded words.
 
RepOrcclear_included_pairs ()
 Clear the set of included pairs.
 
RepOrcclear_long_rules ()
 Clear the set of long rules.
 
RepOrcclear_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.
 
RepOrcidle_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.
 
RepOrcinit ()
 Reinitialize an existing SimsSettings object.
 
RepOrcinit (SimsSettings< OtherSubclass > const &that)
 Initialize from SimsSettings with different subclass.
 
RepOrclong_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.
 
RepOrcnumber_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.
 
RepOrcpresentation (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< RepOrc >
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.
 

Constructor & Destructor Documentation

◆ RepOrc()

template<typename OtherSubclass>
RepOrc ( SimsSettings< OtherSubclass > const & s)
inlineexplicit

This constructor creates a new RepOrc instance with the same SimsSettings as s but that is otherwise uninitialised.

Template Parameters
OtherSubclassthe type of the argument s (which is derived from SimsSettings<OtherSubclass>).
Parameters
sthe Sims1, Sims2 or MinimalRepOrc whose settings should be used.
Exceptions
This function guarantees not to throw a LibsemigroupsException.

Member Function Documentation

◆ init() [1/2]

RepOrc & init ( )

This function puts a RepOrc 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.

◆ init() [2/2]

template<typename OtherSubclass>
RepOrc & init ( SimsSettings< OtherSubclass > const & s)
inline

This function reinitializes a RepOrc instance with the same SimsSettings as s .

Template Parameters
OtherSubclassthe type of the argument s (which is derived from SimsSettings<S>).
Parameters
sthe Sims1, Sims2 or MinimalRepOrc whose settings should be used.
Exceptions
This function guarantees not to throw a LibsemigroupsException.

◆ max_nodes() [1/2]

size_t max_nodes ( ) const
inlinenodiscardnoexcept

This function returns the current value for the maximum number of nodes in the WordGraph that we are seeking.

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

◆ max_nodes() [2/2]

RepOrc & max_nodes ( size_t val)
inlinenoexcept

This function sets the maximum number of nodes in the WordGraph that we are seeking.

Parameters
valthe maximum number of nodes.
Returns
A reference to this.
Exceptions
This function is noexcept and is guaranteed never to throw.

◆ min_nodes() [1/2]

size_t min_nodes ( ) const
inlinenodiscardnoexcept

This function returns the current value for the minimum number of nodes in the WordGraph that we are seeking.

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

◆ min_nodes() [2/2]

RepOrc & min_nodes ( size_t val)
inlinenoexcept

This function sets the minimal number of nodes in the WordGraph that we are seeking.

Parameters
valthe minimum number of nodes.
Returns
A reference to this.
Exceptions
This function is noexcept and is guaranteed never to throw.

◆ target_size() [1/2]

size_t target_size ( ) const
inlinenodiscardnoexcept

This function returns the current value for the target size, i.e. the 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]

RepOrc & target_size ( size_t val)
inlinenoexcept

This function sets the target size, i.e. the 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, of the semigroup or monoid defined by its presentation with the following properties:

If no such WordGraph can be found, then an empty WordGraph is returned (with 0 nodes and 0 edges).

Returns
A value of type WordGraph.
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: