CongruenceWrapper

template<typename T>
class CongruenceWrapper : public libsemigroups::FpSemigroupInterface

Defined in cong-wrap.hpp.

This class wraps a derived class of CongruenceInterface of type T so that it has the FpSemigroupInterface.

Member types

wrapped_type

The type of the wrapped congruence, also the template parameter T.

Constructors

CongruenceWrapper()

Default constructor.

CongruenceWrapper(CongruenceWrapper const&)

Default copy constructor.

CongruenceWrapper(CongruenceWrapper&&) = default

Deleted.

CongruenceWrapper(S const&)

Constructor from a const reference to a FroidurePinBase .

CongruenceWrapper(std::shared_ptr<FroidurePinBase>)

Constructor from a std::shared_ptr to a FroidurePinBase .

Deleted constructors

operator=(CongruenceWrapper const&) = delete

Deleted.

operator=(CongruenceWrapper&&) = delete

Deleted.

CongruenceWrapper member functions

congruence() const

Get a reference to the underlying congruence.

Member functions and types inherited from FpSemigroupInterface

add_rule(relation_type)

Add a rule using a relation_type .

add_rule(rule_type)

Add a rule using a rule_type .

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

Add a rule using two word_type const references.

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

Add a rule using two std::string const references.

add_rule(word_type const&, word_type const&)

Add a rule using two word_type const references.

add_rules(FroidurePinBase&)

Add rules from a FroidurePin instance.

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

Add rules in a vector.

alphabet() const noexcept

Returns a const reference to the alphabet.

alphabet(size_t) const

Returns the i th letter of the alphabet.

cbegin_rules() const noexcept

Returns an iterator pointing to the first rule.

cend_rules() const noexcept

Returns an iterator pointing one past the last rule.

char_to_uint(char) const

Convert a char to a letter_type .

char_type

Type for characters.

const_iterator

Type for const iterators to the defining rules.

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

Check if two words represent the same element.

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

Check if two strings represent the same element.

equal_to(word_type const&, word_type const&) override

Check if two words represent the same element.

froidure_pin()

Returns an isomorphic FroidurePin instance.

has_froidure_pin() const noexcept

Check if an isomorphic FroidurePin instance is known.

has_identity() const noexcept

Check if an identity has been set.

identity() const

Returns the identity (if any).

inverses() const

Returns the inverses (if any).

is_obviously_finite()

Check if the finitely presented semigroup is obviously finite.

is_obviously_infinite()

Check if the finitely presented semigroup is obviously infinite.

normal_form(std::initializer_list<letter_type>)

Returns a normal form for a word_type .

normal_form(std::string const&) override

Returns a normal form for a string.

normal_form(word_type const&) override

Returns a normal form for a word_type .

number_of_rules() const noexcept

Returns the number of rules.

rule_type

Type for rules.

set_alphabet(size_t)

Set the size of the alphabet.

set_alphabet(std::string const&)

Set the alphabet of the finitely presented semigroup.

set_identity(letter_type)

Set a character in alphabet() to be the identity using its index.

set_identity(std::string const&)

Set a character in alphabet() to be the identity.

set_inverses(std::string const&)

Set the inverses of letters in alphabet() .

size() override

Returns the size of the finitely presented semigroup.

string_to_word(std::string const&) const

Convert a string to a word_type .

string_type

Type for strings.

to_gap_string()

Returns a string containing GAP commands for defining a finitely presented semigroup.

uint_to_char(letter_type) const

Convert a letter_type to a char.

validate_letter(char) const

Validates a letter specified by a char.

validate_letter(letter_type) const

Validates a letter specified by an integer.

validate_word(std::string const&) const

Validates a word given by a std::string.

validate_word(word_type const&) const

Validates a word given by a word_type .

word_to_string(word_type const&) const

Convert a word_type to a std::string.

Member functions inherited from Runner

dead() const noexcept

Check if the runner is dead.

finished() const

Check if run has been run to completion or not.

kill() noexcept

Stop run from running (thread-safe).

report() const

Check if it is time to report.

report_every() const noexcept

Get the minimum elapsed time between reports.

report_every(TIntType)

Set the minimum elapsed time between reports.

report_every(std::chrono::nanoseconds)

Set the minimum elapsed time between reports.

report_why_we_stopped() const

Report why run stopped.

run()

Run until finished .

run_for(TIntType)

Run for a specified amount of time.

run_for(std::chrono::nanoseconds)

Run for a specified amount of time.

run_until(T&&)

Run until a nullary predicate returns true or finished .

run_until(bool(*)())

Run until a nullary predicate returns true or finished .

running() const noexcept

Check if currently running.

running_for() const noexcept

Check if the runner is currently running for a particular length of time.

running_until() const noexcept

Check if the runner is currently running until a nullary predicate returns true.

started() const

Check if run has been called at least once before.

stopped() const

Check if the runner is stopped.

stopped_by_predicate() const

Check if the runner was, or should, stop because of the argument for run_until .

timed_out() const

Check if the amount of time passed to run_for has elapsed.