Member functions

This page lists the member functions of the Congruence class that are not present in its base classes Runner and CongruenceInterface.

template<typename T>
inline void libsemigroups::Congruence::add_runner(T const &r)

Adds a class derived from CongruenceInterface to the algorithms used to compute the congruence.

This function adds the algorithm represented by the parameter r to the list of runners that are invoked when run is called.

Warning

It’s the responsibility of the caller to ensure that r is compatible with any existing CongruenceInterface instances in this.

Template Parameters

T – a type derived from CongruenceInterface.

Parameters

r – a const reference to an instance of a type derived from CongruenceInterface.

Throws

LibsemigroupsException – if started() returns true.

Returns

(None)

inline bool libsemigroups::Congruence::has_kambites() const

Checks if a Kambites instance is being used to compute the congruence.

See also

kambites.

Parameters

(None)

Complexity

Constant.

Throws

(None) – This function guarantees not to throw a LibsemigroupsException.

Returns

A value to type bool.

inline bool libsemigroups::Congruence::has_knuth_bendix() const

Checks if a KnuthBendix instance is being used to compute the congruence.

See also

knuth_bendix().

Parameters

(None)

Complexity

Constant.

Throws

(None) – This function guarantees not to throw a LibsemigroupsException.

Returns

A value of type bool.

inline bool libsemigroups::Congruence::has_todd_coxeter() const

Checks if a ToddCoxeter instance is being used to compute the congruence.

See also

todd_coxeter.

Parameters

(None)

Complexity

Constant.

Throws

(None) – This function guarantees not to throw a LibsemigroupsException.

Returns

A value to type bool.

inline std::shared_ptr<congruence::Kambites> libsemigroups::Congruence::kambites() const

Returns the Kambites instance used to compute the congruence (if any).

See also

has_kambites().

Parameters

(None)

Complexity

Constant.

Throws

(None) – This function guarantees not to throw a LibsemigroupsException.

Returns

A shared_ptr to a congruence::Kambites or nullptr.

inline std::shared_ptr<congruence::KnuthBendix> libsemigroups::Congruence::knuth_bendix() const

Returns the KnuthBendix instance used to compute the congruence (if any).

See also

has_knuth_bendix().

Parameters

(None)

Complexity

Constant.

Throws

(None) – This function guarantees not to throw a LibsemigroupsException.

Returns

A std::shared_ptr to a congruence::KnuthBendix or nullptr.

inline size_t libsemigroups::Congruence::max_threads() const noexcept

Get the current maximum number of threads.

Complexity

Constant.

Parameters

(None)

Throws

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

Returns

A value of type size_t.

inline Congruence &libsemigroups::Congruence::max_threads(size_t val) noexcept

Set the maximum number of threads.

Complexity

Constant.

Parameters

val – the number of threads.

Throws

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

Returns

A reference to this.

inline std::shared_ptr<congruence::ToddCoxeter> libsemigroups::Congruence::todd_coxeter() const

Returns the ToddCoxeter instance used to compute the congruence (if any).

See also

has_todd_coxeter().

Parameters

(None)

Complexity

Constant.

Throws

(None) – This function guarantees not to throw a LibsemigroupsException.

Returns

A shared_ptr to a congruence::ToddCoxeter or nullptr.