Type aliases¶
-
using libsemigroups::ActionTraits::EqualTo = ::libsemigroups::EqualTo<TPointType>¶
Adapter for testing equality.
Defined in
adapters.hpp
.This type should be a stateless trivially default constructible with a call operator of signature
bool operator()(TValueType const&, TValueType const&)
(possiblynoexcept
,inline
and/orconstexpr
also) for use with, for example, std::unordered_map.- Template Parameters
TValueType – the type of objects to compare.
TSfinae – this template parameter can be used for SFINAE.
-
using libsemigroups::ActionTraits::Hash = ::libsemigroups::Hash<TPointType>¶
Adapter for hashing.
Defined in
adapters.hpp
.This type should be a stateless trivially default constructible with a call operator of signature
size_t operator()(TValueType const&)
for use with, for example, std::unordered_map.- Template Parameters
TValueType – the type of objects to compare.
TSfinae – this template parameter can be used for SFINAE.
-
using libsemigroups::ActionTraits::One = ::libsemigroups::One<TElementType>¶
Adapter for the identity element of the given type.
Specialisations of this struct should be stateless trivially default constructible with two call operator of signatures:
TElementType operator()(size_t n) const
(possiblynoexcept
,inline
and/orconstexpr
also) returning a multiplicative identity element for the categoryTElementType
and withDegree<TElementType>()(x)
equal to the parametern
. For example, ifTElementType
is a type of n x n matrices, then this should return the n x n identity matrix.TElementType operator()(T const&) const
(possiblynoexcept
,inline
and/orconstexpr
also). This could be implemented as:TElementType operator()(TElementType const& x) const noexcept { return this->operator()(Degree<TElementType>()(x)); }
- Used by:
- Example
template <typename T> struct One< T, typename std::enable_if<std::is_base_of<PTransf16, T>::value>::type> { T operator()(size_t = 0) const noexcept { return T::one(); } T operator()(T const&) const noexcept { return T::one(); } };
- Template Parameters
TElementType – the type of the elements of a semigroup.
TSfinae – this template parameter can be used for SFINAE.
-
using libsemigroups::ActionTraits::Product = ::libsemigroups::Product<TElementType>¶
Adapter for the product of two elements.
Defined in
adapters.hpp
.Specialisations of this struct should be stateless trivially default constructible with a call operator of signature
void operator()(TElementType& xy, TElementType const& x, TElementType const& y, size_t = 0)
(possiblynoexcept
,inline
and/orconstexpr
also).The call operator should change
xy
in-place to be the product ofx
andy
. The 4th parameter is optional and it can be used as an index for static thread local storage, that might be required for forming the product ofx
andy
. The purpose of the 1st parameter is to avoid repeated allocations of memory to hold temporary products that are discarded soon after they are created.- Used by:
- Example
template <> struct Product<size_t> { void operator()(size_t& xy, size_t x, size_t y, size_t = 0) const noexcept { xy = x * y; } };
- Template Parameters
TElementType – the type of the elements of a semigroup.
TSfinae – this template parameter can be used for SFINAE.
-
using libsemigroups::ActionTraits::Swap = ::libsemigroups::Swap<TElementType>¶
Adapter for swapping.
Defined in
adapters.hpp
.This type should be a stateless trivially default constructible with a call operator of signature
void operator()(TValueType const&, TValueType const&)
(possiblynoexcept
,inline
and/orconstexpr
also) which swaps its arguments.- Template Parameters
TValueType – the type of objects to compare.
TSfinae – this template parameter can be used for SFINAE.