![]() |
libsemigroups
v3.0.0
C++ library for semigroups and monoids
|
This class implements a number of checks whether or not a finitely presented semigroup or monoid is infinite. These checks are all decidable, and always return an answer within an amount of time that is linear in the size of the input.
These checks are:
Public Types | |
using | const_iterator_pair_string |
Alias for std::vector< std::pair<std::string, std::string>>::const_iterator . | |
using | const_iterator_string |
Alias for std::vector<std::string>::const_iterator . | |
using | const_iterator_word_type |
Alias for std::vector<word_type>::const_iterator . | |
Public Member Functions | |
IsObviouslyInfinite (IsObviouslyInfinite &&)=delete | |
Deleted. | |
IsObviouslyInfinite (IsObviouslyInfinite const &)=delete | |
Deleted. | |
IsObviouslyInfinite (size_t n) | |
Construct from alphabet size. | |
IsObviouslyInfinite (std::string const &lphbt) | |
Construct from alphabet. | |
IsObviouslyInfinite & | add_rules_no_checks (std::string const &lphbt, const_iterator_pair_string first, const_iterator_pair_string last) |
Add rules from iterators to std::pair of std::string. | |
IsObviouslyInfinite & | add_rules_no_checks (std::string const &lphbt, const_iterator_string first, const_iterator_string last) |
Add rules from iterators to std::string. | |
IsObviouslyInfinite & | add_rules_no_checks (std::string const &lphbt, const_iterator_word_type first, const_iterator_word_type last) |
Add rules from iterators to word_type. | |
IsObviouslyInfinite & | add_rules_no_checks (word_type const &, const_iterator_word_type first, const_iterator_word_type last) |
Add rules from iterators to word_type. | |
IsObviouslyInfinite & | init (size_t n) |
IsObviouslyInfinite & | init (std::string const &lphbt) |
IsObviouslyInfinite & | operator= (IsObviouslyInfinite &&)=delete |
Deleted. | |
IsObviouslyInfinite & | operator= (IsObviouslyInfinite const &)=delete |
Deleted. | |
bool | result () const |
Returns whether or not the finitely presented semigroup or monoid is obviously infinite. | |
Alias for std::vector< std::pair<std::string, std::string>>::const_iterator
.
using const_iterator_string |
using const_iterator_word_type |
|
explicit |
Constructs an empty IsObviouslyInfinite object representing a finitely presented semigroup or monoid with n
generators.
n | the number of generators. |
|
inlineexplicit |
Constructs an empty IsObviouslyInfinite object representing a finitely presented semigroup or monoid with alphabet lphbt
.
lphbt | the alphabet to use. |
IsObviouslyInfinite & add_rules_no_checks | ( | std::string const & | lphbt, |
const_iterator_pair_string | first, | ||
const_iterator_pair_string | last ) |
This function adds the rules described by the iterators first
and last
. The rules are translated to word_type objects using the position of each character in the 1st argument lphbt
.
lphbt | the alphabet to use. |
first | iterator pointing at the left-hand-side of the first rule to add. |
last | iterator pointing one beyond the right-hand-side of the last rule to add. |
*this
.IsObviouslyInfinite & add_rules_no_checks | ( | std::string const & | lphbt, |
const_iterator_string | first, | ||
const_iterator_string | last ) |
This function adds the rules described by the iterators first
and last
. The rules are translated to word_type objects using the position of each character in the 1st argument lphbt
.
lphbt | the alphabet to use. |
first | iterator pointing at the left-hand-side of the first rule to add. |
last | iterator pointing one beyond the right-hand-side of the last rule to add. |
*this
.IsObviouslyInfinite & add_rules_no_checks | ( | std::string const & | lphbt, |
const_iterator_word_type | first, | ||
const_iterator_word_type | last ) |
This function adds the rules described by the iterators first
and last
.
lphbt | unused (for consistency of interface only). |
first | iterator pointing at the left-hand-side of the first rule to add. |
last | iterator pointing one beyond the right-hand-side of the last rule to add. |
*this
.IsObviouslyInfinite & add_rules_no_checks | ( | word_type const & | , |
const_iterator_word_type | first, | ||
const_iterator_word_type | last ) |
This function adds the rules described by the iterators first
and last
.
first | iterator pointing at the left-hand-side of the first rule to add. |
last | iterator pointing one beyond the right-hand-side of the last rule to add. |
*this
.IsObviouslyInfinite & init | ( | size_t | n | ) |
Re-initialize the object as if it had just been constructed.
Calling this function puts it into the same state that it would have been in if it had just been newly constructed with the same parameter n
.
This function exists to allow reuse of the memory allocated within the object.
n | the number of generators. |
*this
.
|
inline |
Re-initialize the object as if it had just been constructed.
Calling this function puts it into the same state that it would have been in if it had just been newly constructed with the same parameter n
.
This function exists to allow reuse of the memory allocated within the object.
lphbt | the alphabet to use. |
*this
.bool result | ( | ) | const |
This function returns true
if the finitely presented semigroup or monoid defined using the alphabet used to construct an IsObviouslyInfinite object, and with relations added to the IsObviouslyInfinite object by add_rules_no_checks, is obviously infinite.