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

Defined in cong-common-helpers.hpp.

This page contains the documentation of the functions currently_contains_no_checks; currently_contains; contains_no_checks; and contains which can be invoked with a variety of different argument types.

These helper functions can be applied to objects of the types:

Functions with the prefix currently_ do not perform any enumeration of the object representing a congruence; and those with the suffix _no_checks do not check that the input words are valid.

Functions

template<typename Thing>
bool contains (Thing &thing, char const *u, char const *v)
 Helper for checking containment of a pair of words (string literal).
 
template<typename Thing, typename Int>
bool contains (Thing &thing, std::initializer_list< Int > const &u, std::initializer_list< Int > const &v)
 Helper for checking containment of a pair of words (std::initializer_list).
 
template<typename Thing>
bool contains (Thing &thing, std::string_view u, std::string_view v)
 Helper for checking containment of a pair of words (std::string_view).
 
template<typename Thing>
bool contains (Thing &thing, typename Thing::native_word_type const &u, typename Thing::native_word_type const &v)
 Check containment of a pair of words.
 
template<typename Thing>
bool contains_no_checks (Thing &thing, char const *u, char const *v)
 Helper for checking containment of a pair of words (string literal).
 
template<typename Thing, typename Int>
bool contains_no_checks (Thing &thing, std::initializer_list< Int > const &u, std::initializer_list< Int > const &v)
 Helper for checking containment of a pair of words (std::initializer_list).
 
template<typename Thing>
bool contains_no_checks (Thing &thing, std::string_view u, std::string_view v)
 Helper for checking containment of a pair of words (std::string_view).
 
template<typename Thing>
bool contains_no_checks (Thing &thing, typename Thing::native_word_type const &u, typename Thing::native_word_type const &v)
 Check containment of a pair of words.
 
template<typename Thing>
tril currently_contains (Thing const &thing, char const *u, char const *v)
 Helper for checking containment of a pair of words (string literal).
 
template<typename Thing, typename Int>
tril currently_contains (Thing const &thing, std::initializer_list< Int > const &u, std::initializer_list< Int > const &v)
 Helper for checking containment of a pair of words (std::initializer_list).
 
template<typename Thing>
tril currently_contains (Thing const &thing, std::string_view u, std::string_view v)
 Helper for checking containment of a pair of words (std::string_view).
 
template<typename Thing>
tril currently_contains (Thing const &thing, typename Thing::native_word_type const &u, typename Thing::native_word_type const &v)
 Check containment of a pair of words.
 
template<typename Thing>
tril currently_contains_no_checks (Thing const &thing, char const *u, char const *v)
 Helper for checking containment of a pair of words (string literal).
 
template<typename Thing, typename Int>
tril currently_contains_no_checks (Thing const &thing, std::initializer_list< Int > const &u, std::initializer_list< Int > const &v)
 Helper for checking containment of a pair of words (std::initializer_list).
 
template<typename Thing>
tril currently_contains_no_checks (Thing const &thing, std::string_view u, std::string_view v)
 Helper for checking containment of a pair of words (std::string_view).
 
template<typename Thing>
tril currently_contains_no_checks (Thing const &thing, typename Thing::native_word_type const &u, typename Thing::native_word_type const &v)
 Check containment of a pair of words.
 

Function Documentation

◆ contains() [1/4]

template<typename Thing>
bool contains ( Thing & thing,
char const * u,
char const * v )
nodiscard

Defined in cong-common-helpers.hpp.

See contains for details.

◆ contains() [2/4]

template<typename Thing, typename Int>
bool contains ( Thing & thing,
std::initializer_list< Int > const & u,
std::initializer_list< Int > const & v )
nodiscard

Defined in cong-common-helpers.hpp.

Template Parameters
Intmust satisfy std::integral_type_v<Int>.

See contains for details.

◆ contains() [3/4]

template<typename Thing>
bool contains ( Thing & thing,
std::string_view u,
std::string_view v )
nodiscard

Defined in cong-common-helpers.hpp.

See contains for details.

◆ contains() [4/4]

template<typename Thing>
bool contains ( Thing & thing,
typename Thing::native_word_type const & u,
typename Thing::native_word_type const & v )
nodiscard

Defined in cong-common-helpers.hpp.

This function checks whether or not the words u and v are contained in the congruence represented by thing. This function triggers a full enumeration of thing, which may never terminate.

Template Parameters
Thingthe type of the first parameter must be one of Kambites, KnuthBendix, ToddCoxeter, or Congruence.
Parameters
thingthe object to check containment in.
uthe left hand side of the pair to add.
vthe right hand side of the pair to add.
Returns
Whether or not the pair belongs to the congruence.
Exceptions
LibsemigroupsExceptionif any of the values pointed at by the iterators is out of range, i.e. they do not belong to presentation().alphabet() and Presentation::validate_word throws.

◆ contains_no_checks() [1/4]

template<typename Thing>
bool contains_no_checks ( Thing & thing,
char const * u,
char const * v )
nodiscard

Defined in cong-common-helpers.hpp.

See contains_no_checks for details.

◆ contains_no_checks() [2/4]

template<typename Thing, typename Int>
bool contains_no_checks ( Thing & thing,
std::initializer_list< Int > const & u,
std::initializer_list< Int > const & v )
nodiscard

Defined in cong-common-helpers.hpp.

Template Parameters
Intmust satisfy std::integral_type_v<Int>.

See contains_no_checks for details.

◆ contains_no_checks() [3/4]

template<typename Thing>
bool contains_no_checks ( Thing & thing,
std::string_view u,
std::string_view v )
nodiscard

Defined in cong-common-helpers.hpp.

See contains_no_checks for details.

◆ contains_no_checks() [4/4]

template<typename Thing>
bool contains_no_checks ( Thing & thing,
typename Thing::native_word_type const & u,
typename Thing::native_word_type const & v )
nodiscard

Defined in cong-common-helpers.hpp.

This function checks whether or not the words u and v are contained in the congruence represented by thing. This function triggers a full enumeration of thing, which may never terminate.

Template Parameters
Thingthe type of the first parameter must be one of Kambites, KnuthBendix, ToddCoxeter, or Congruence.
Parameters
thingthe object to check containment in.
uthe left hand side of the pair to add.
vthe right hand side of the pair to add.
Returns
Whether or not the pair belongs to the congruence.
Warning
This function does not check that the arguments are valid. In particular, it is assumed that every value pointed at by the iterators belongs to presentation().alphabet().

◆ currently_contains() [1/4]

template<typename Thing>
tril currently_contains ( Thing const & thing,
char const * u,
char const * v )
nodiscard

Defined in cong-common-helpers.hpp.

See currently_contains for details.

◆ currently_contains() [2/4]

template<typename Thing, typename Int>
tril currently_contains ( Thing const & thing,
std::initializer_list< Int > const & u,
std::initializer_list< Int > const & v )
nodiscard

Defined in cong-common-helpers.hpp.

Template Parameters
Intmust satisfy std::integral_type_v<Int>.

See currently_contains for details.

◆ currently_contains() [3/4]

template<typename Thing>
tril currently_contains ( Thing const & thing,
std::string_view u,
std::string_view v )
nodiscard

Defined in cong-common-helpers.hpp.

See currently_contains for details.

◆ currently_contains() [4/4]

template<typename Thing>
tril currently_contains ( Thing const & thing,
typename Thing::native_word_type const & u,
typename Thing::native_word_type const & v )
nodiscard

Defined in cong-common-helpers.hpp.

This function checks whether or not the words u and v are already known to be contained in the congruence represented by thing. This function performs no enumeration of thing, so it is possible for the words to be contained in the congruence, but that this is not currently known.

Template Parameters
Thingthe type of the first parameter must be one of Kambites, KnuthBendix, ToddCoxeter, or Congruence.
Parameters
thingthe object to check containment in.
uthe first word.
vthe second word.
Returns
Exceptions
LibsemigroupsExceptionif any of the values pointed at by the iterators is out of range, i.e. they do not belong to presentation().alphabet() and Presentation::validate_word throws.

◆ currently_contains_no_checks() [1/4]

template<typename Thing>
tril currently_contains_no_checks ( Thing const & thing,
char const * u,
char const * v )
nodiscard

◆ currently_contains_no_checks() [2/4]

template<typename Thing, typename Int>
tril currently_contains_no_checks ( Thing const & thing,
std::initializer_list< Int > const & u,
std::initializer_list< Int > const & v )
nodiscard

Defined in cong-common-helpers.hpp.

Template Parameters
Intmust satisfy std::integral_type_v<Int>.

See currently_contains_no_checks for details.

◆ currently_contains_no_checks() [3/4]

template<typename Thing>
tril currently_contains_no_checks ( Thing const & thing,
std::string_view u,
std::string_view v )
nodiscard

◆ currently_contains_no_checks() [4/4]

template<typename Thing>
tril currently_contains_no_checks ( Thing const & thing,
typename Thing::native_word_type const & u,
typename Thing::native_word_type const & v )
nodiscard

Defined in cong-common-helpers.hpp.

This function checks whether or not the words u and v are already known to be contained in the congruence represented by thing. This function performs no enumeration of thing, so it is possible for the words to be contained in the congruence, but that this is not currently known.

Template Parameters
Thingthe type of the first parameter must be one of Kambites, KnuthBendix, ToddCoxeter, or Congruence.
Parameters
thingthe object to check containment in.
uthe first word.
vthe second word.
Returns
Warning
This function does not check that the arguments are valid. In particular, it is assumed that every value pointed at by the iterators belongs to presentation().alphabet().