Congruence

class Congruence : public libsemigroups::CongruenceInterface

Defined in cong.hpp.

On this page we describe the functionality relating to the Congruence class. This class can be used for computing a congruence over a semigroup by running every applicable algorithm from libsemigroups (and 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 congruence::ToddCoxeter and congruence::KnuthBendix.

See also

congruence_kind and tril.

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

Congruence cong(twosided, S);
cong.add_pair({1, 1, 1}, {0});
cong.number_of_classes(); // 3

Member types

class_index_type

Type for indices of congruence class indices.

const_iterator

non_trivial_class_iterator

non_trivial_classes_type

options

options::runners

Constructors

Congruence(congruence_kind, FpSemigroup&)

Congruence(congruence_kind, T const&)

Congruence(congruence_kind, options::runners)

Congruence(congruence_kind, std::shared_ptr<FroidurePinBase>)

Deleted constructors

Congruence() = delete

Deleted.

Congruence(Congruence const&) = delete

Deleted.

Congruence(Congruence&&) = delete

Deleted.

operator=(Congruence const&) = delete

Deleted.

operator=(Congruence&&) = delete

Deleted.

Member functions

add_runner(T const&)

has_kambites() const

has_knuth_bendix() const

has_todd_coxeter() const

kambites() const

knuth_bendix() const

max_threads() const noexcept

max_threads(size_t) noexcept

todd_coxeter() const

Member functions inherited from CongruenceInterface

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

add_pair(word_type const&, word_type const&)

cbegin_generating_pairs() const noexcept

cbegin_ntc()

cend_generating_pairs() const noexcept

cend_ntc()

class_index_to_word(class_index_type)

const_contains(word_type const&, word_type const&) const override

contains(word_type const&, word_type const&) override

has_parent_fpsemigroup() const noexcept

has_parent_froidure_pin() const noexcept

has_quotient_froidure_pin() const noexcept

is_quotient_obviously_finite()

is_quotient_obviously_infinite()

kind() const noexcept

less(word_type const&, word_type const&)

non_trivial_classes()

number_of_classes()

number_of_generating_pairs() const noexcept

number_of_generators() const noexcept

number_of_non_trivial_classes()

parent_fpsemigroup() const

parent_froidure_pin() const

quotient_froidure_pin()

set_number_of_generators(size_t)

word_to_class_index(word_type 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