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.

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.

See also

add_pair()

Complexity

Constant.

Parameters

(None)

Throws

(None) – This function is noexcept and is guaranteed never to throw.

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.

Complexity

Constant.

Parameters

(None)

Throws

(None) – This function is noexcept and is guaranteed never to throw.

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)