congruence::KnuthBendix

class KnuthBendix : public libsemigroups::CongruenceInterface

Defined in knuth-bendix.hpp.

On this page we describe the functionality relating to the Knuth-Bendix algorithm for computing congruences of semigroups and monoids.

This page contains details of the member functions of the class congruence::KnuthBendix.

Example
KnuthBendix kb;
kb.set_number_of_generators(2);
kb.add_pair({0, 0, 0}, {0});
kb.add_pair({0}, {1, 1});

kb.number_of_classes();                            // 5
kb.word_to_class_index({0, 0, 1});          // 4
kb.word_to_class_index({0, 0, 0, 0, 1});    // 4
kb.word_to_class_index({0, 1, 1, 0, 0, 1}); // 4
kb.word_to_class_index({0, 0, 0});          // 0
kb.word_to_class_index({1});                // 1
kb.word_to_class_index({0, 0, 0, 0});       // 2

Note

congruence::KnuthBendix can only be used to compute 2-sided congruences.

Constructors

KnuthBendix()

KnuthBendix(KnuthBendix const&)

KnuthBendix(T const&)

KnuthBendix(fpsemigroup::KnuthBendix const&)

KnuthBendix(std::shared_ptr<FroidurePinBase>)

Deleted constructors

KnuthBendix(KnuthBendix&&) = delete

Deleted.

operator=(KnuthBendix const&) = delete

Deleted.

operator=(KnuthBendix&&) = delete

Deleted.

Member functions

knuth_bendix() const

Member functions and types 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)

class_index_type

Type for indices of congruence class indices.

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

const_iterator

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_class_iterator

non_trivial_classes()

non_trivial_classes_type

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