libsemigroups  v3.5.3
C++ library for semigroups and monoids
Loading...
Searching...
No Matches

This page contains the documentation of the various member functions of the Congruence class that can be used to access the state of an instance.

Those functions with the prefix current_ do not perform any further enumeration.

Functions

bool any_runner_started () const noexcept
 Check if any runner has started.
 
template<typename Thing>
std::shared_ptr< Thing > get () const
 Get a derived class of Runner being used to compute a Congruence instance.
 
template<typename Thing>
bool has () const
 Check if a derived class of Runner being used to compute a Congruence instance.
 

Function Documentation

◆ any_runner_started()

template<typename Word>
bool any_runner_started ( ) const
inlinenodiscardnoexcept

This function returns true if any runner in a Congruence object has started and false otherwise. You might expect that started would return the same answer, but remember that started returns true if and only if run has been called at least once; and there are helper functions, such as is_obviously_infinite, that might start some of the runners of a Congruence without ever calling run.

Returns
Whether any runner has started.
Exceptions
This function is noexcept and is guaranteed never to throw.

◆ get()

template<typename Word>
template<typename Thing>
std::shared_ptr< Thing > get ( ) const

This function returns a std::shared_ptr to a Thing if such an object is being used or could be used to compute the congruence represented by a Congruence instance. If no such Thing is available, then an exception is thrown.

Template Parameters
Thingthe type of the Runner object being sought.
Returns
The derived class of Runner of type Thing contained in the Congruence.
Exceptions
LibsemigroupsExceptionif no Thing is available.
See also
has.

◆ has()

template<typename Word>
template<typename Thing>
bool has ( ) const
nodiscard

This function returns true if a Thing is being used or could be used to compute the congruence represented by a Congruence instance; or false if not.

Template Parameters
Thingthe type of the Runner object being sought.
Returns
Whether or not a Thing is being used to compute the Congruence instance.
Exceptions
This function guarantees not to throw a LibsemigroupsException.
See also
get.