19#ifndef LIBSEMIGROUPS_ADAPTERS_HPP_
20#define LIBSEMIGROUPS_ADAPTERS_HPP_
85 template <
typename... Args>
86 constexpr void operator()(Args...) const noexcept {}
120 template <
typename Element,
typename =
void>
158 template <
typename Element,
typename =
void>
198 template <
typename Element,
typename =
void>
245 template <
typename Element,
typename =
void>
283 template <
typename Element,
typename =
void>
318 template <
typename Element,
typename =
void>
349 template <
typename Element,
typename Po
int,
typename =
void>
391 template <
typename Element,
typename Po
int,
typename =
void>
412 template <
typename Value,
typename =
void>
445 template <
typename Value,
typename =
void>
476 template <
typename T>
507 template <
typename T,
typename Hasher>
518 for (T
const& x : vec) {
519 val ^= Hasher()(x) + 0x9e3779b97f4a7c16 + (val << 6) + (val >> 2);
538 template <
typename T,
size_t N>
549 for (T
const& x : ar) {
550 val ^=
Hash<T>()(x) + 0x9e3779b97f4a7c16 + (val << 6) + (val >> 2);
570 template <
typename S,
typename T>
581 val ^=
Hash<S>()(x.first) + 0x9e3779b97f4a7c16 + (val << 6) + (val >> 2);
582 val ^=
Hash<T>()(x.second) + 0x9e3779b97f4a7c16 + (val << 6) + (val >> 2);
598 struct Hash<
std::pair<size_t, size_t>> {
609#if LIBSEMIGROUPS_SIZEOF_VOID_P == 8
610 return (x.first << 32) + x.second;
612 return (x.first << 16) + x.second;
633 template <
typename Value,
typename =
void>
665 template <
typename Value,
typename =
void>
689 template <
typename Element,
694 "the 3rd template parameter is not a container of objects of "
695 "type the 2nd template parameter");
716 Element
const& x)
const {
717 for (
size_t i = 0; i < pt.size(); ++i) {
737 template <
typename Element,
766 Element
const& p)
const {
792 template <
typename Element,
typename =
void>
811 template <
typename Element,
typename =
void>
832 template <
typename Element,
typename Po
int,
typename =
void>
853 template <
typename Element,
typename Po
int,
typename =
void>
876 template <
typename Element,
typename =
void>
887 template <typename T>
927 template <
typename Element,
Base class for states for ranks.
Definition adapters.hpp:877
RankState & operator=(RankState const &)=delete
Deleted.
RankState(RankState const &)=default
Deleted.
RankState & operator=(RankState &&)=delete
Deleted.
void type
Definition adapters.hpp:881
RankState() noexcept=default
Default constructor; does nothing.
RankState(RankState &&)=delete
Deleted.
Namespace for everything in the libsemigroups library.
Definition action.hpp:44
Adapter for the complexity of multiplication.
Definition adapters.hpp:121
Adapter for the degree of an element.
Definition adapters.hpp:159
Adapter for testing equality.
Definition adapters.hpp:413
bool operator()(Value const &x, Value const &y) const
Compare x and y with std::equal_to.
Definition adapters.hpp:423
size_t operator()(std::array< T, N > const &ar) const
Hashes ar.
Definition adapters.hpp:547
size_t operator()(std::pair< S, T > const &x) const noexcept
Hashes x.
Definition adapters.hpp:579
size_t operator()(std::vector< T > const &vec) const
Hashes vec.
Definition adapters.hpp:516
size_t operator()(std::vector< T > const &vec) const
Hashes vec.
Definition adapters.hpp:487
Adapter for hashing.
Definition adapters.hpp:446
size_t operator()(Value const &x) const
Hash x using std::hash.
Definition adapters.hpp:455
Adapter for the value of a left action.
Definition adapters.hpp:350
Adapter for the value of a right action.
Definition adapters.hpp:392
Adapter for increasing the degree of an element.
Definition adapters.hpp:199
Adapter for the inverse of an element.
Definition adapters.hpp:319
Adapter for the action on LambdaValue's.
Definition adapters.hpp:833
Adapter for lambda functions.
Definition adapters.hpp:793
Adapter for comparisons.
Definition adapters.hpp:634
bool operator()(Value const &x, Value const &y) const
Compare if x is less than y.
Definition adapters.hpp:644
Adapter for calculating right actions of each element in a container.
Definition adapters.hpp:740
void operator()(Container &res, Container const &pt, Element const &p) const
Calculate right actions of each element in a container, then sort.
Definition adapters.hpp:764
Adapter for calculating right actions of each element in a container.
Definition adapters.hpp:692
void operator()(Container &res, Container const &pt, Element const &x) const
Calculate right actions of each element in a container.
Definition adapters.hpp:714
Adapter for the identity element of the given type.
Definition adapters.hpp:246
Adapter for the product of two elements.
Definition adapters.hpp:284
Adapter for calculating ranks.
Definition adapters.hpp:930
Adapter for the action on RhoValue's.
Definition adapters.hpp:854
Adapter for rho functions.
Definition adapters.hpp:812
Adapter for swapping.
Definition adapters.hpp:666
void operator()(Value &x, Value &y)
Swap x and y.
Definition adapters.hpp:673