Initialization

This page contains information about initialising the CongruenceInterface class.

inline void libsemigroups::CongruenceInterface::add_pair(std::initializer_list<size_t> l, std::initializer_list<size_t> r)

Add a generating pair to the congruence.

See

add_pair(word_type const&, word_type const&)

void libsemigroups::CongruenceInterface::add_pair(word_type const &u, word_type const &v)

Add a generating pair to the congruence.

Complexity

Linear in u.size() + v.size().

Note

In some circumstances this function does not do anything. These are:

Parameters
  • u – a word (vector of integers) over the generators of the semigroup.

  • v – a word (vector of integers) over the generators of the semigroup.

Throws
Returns

(None)

inline size_t libsemigroups::CongruenceInterface::number_of_generating_pairs() const noexcept

The number of generating pairs.

This function returns the number of generating pairs of the congruence.

Exceptions

This function is noexcept and is guaranteed never to throw.

Complexity

Constant.

Parameters

(None)

See

add_pair()

Returns

A value of type size_t.

inline size_t libsemigroups::CongruenceInterface::number_of_generators() const noexcept

The number of generators.

This function returns the number of generators of the semigroup of the congruence that an object of this type represents, or UNDEFINED if this has not been defined.

Exceptions

This function is noexcept and is guaranteed never to throw.

Complexity

Constant.

Parameters

(None)

See

set_number_of_generators()

Returns

A value of type size_t.

void libsemigroups::CongruenceInterface::set_number_of_generators(size_t n)

Set the number of generators of the congruence.

Complexity

Constant.

Parameters

n – the number of generators.

Throws

LibsemigroupsException – If the number of generators has already been set to another value, or the parameter n is 0.

Returns

(None)