FpSemigroup

class FpSemigroup : public libsemigroups::FpSemigroupInterface

Defined in fpsemi.hpp.

This is a class for representing finitely presented semigroups and monoids.

On this page we describe the functionality relating to the FpSemigroup class. This class can be used for computing a finitely presented semigroup or monoid by running every applicable algorithm from libsemigroups (and possibly some variants of the same algorithm) in parallel. This class is provided for convenience, at present it is not very customisable, and lacks some of the fine grained control offered by the classes implementing individual algorithms, such as fpsemigroup::ToddCoxeter and fpsemigroup::KnuthBendix.

Example
FpSemigroup S;
S.set_alphabet(3);
S.set_identity(0);
S.add_rule({1, 2}, {0});
S.is_obviously_infinite();  // false

Member types

char_type

Type for characters.

const_iterator

Type for const iterators to the defining rules.

rule_type

Type for rules.

string_type

Type for strings.

Constructors

FpSemigroup()

FpSemigroup(FpSemigroup const&) = default

Default copy constructor.

FpSemigroup(T const&)

FpSemigroup(std::shared_ptr<FroidurePinBase>)

Deleted constructors

FpSemigroup(FpSemigroup&&) = delete

operator=(FpSemigroup const&) = delete

operator=(FpSemigroup&&) = delete

Settings

max_threads() const noexcept

max_threads(size_t) noexcept

Member functions inherited from FpSemigroupInterface

add_rule(relation_type)

add_rule(rule_type)

add_rule(std::initializer_list<size_t>, std::initializer_list<size_t>)

add_rule(std::string const&, std::string const&)

add_rule(word_type const&, word_type const&)

add_rules(FroidurePinBase&)

add_rules(std::vector<rule_type> const&)

alphabet() const noexcept

alphabet(size_t) const

cbegin_rules() const noexcept

cend_rules() const noexcept

char_to_uint(char) const

equal_to(std::initializer_list<letter_type>, std::initializer_list<letter_type>)

equal_to(std::string const&, std::string const&) override

equal_to(word_type const&, word_type const&)

froidure_pin()

has_froidure_pin() const noexcept

has_identity() const noexcept

identity() const

inverses() const

is_obviously_finite()

is_obviously_infinite()

normal_form(std::initializer_list<letter_type>)

normal_form(std::string const&) override

normal_form(word_type const&)

number_of_rules() const noexcept

set_alphabet(size_t)

set_alphabet(std::string const&)

set_identity(letter_type)

set_identity(std::string const&)

set_inverses(std::string const&)

size() override

string_to_word(std::string const&) const

to_gap_string()

uint_to_char(letter_type) const

validate_letter(char) const

validate_letter(letter_type) const

validate_word(std::string const&) const

validate_word(word_type const&) const

word_to_string(word_type const&) const

Member functions inherited from Runner

dead() const noexcept

finished() const

kill() noexcept

report() const

report_every() const noexcept

report_every(TIntType)

report_every(std::chrono::nanoseconds)

report_why_we_stopped() const

run()

run_for(TIntType)

run_for(std::chrono::nanoseconds)

run_until(T&&)

run_until(bool(*)())

running() const noexcept

running_for() const noexcept

running_until() const noexcept

started() const

stopped() const

stopped_by_predicate() const

timed_out() const