Stateless type aliases¶
-
using libsemigroups::SchreierSimsTraits::Action = ::libsemigroups::ImageRightAction<TElementType, TPointType>¶
Adapter for the value of a right action.
Defined in
adapters.hpp
.Specialisations of this struct should be stateless trivially default constructible with a call operator of signature:
void operator()(TPointType& res, TElementType const& x, TPointType const& pt) const
(possiblynoexcept
,inline
and/orconstexpr
also); orTPointType operator()(TElementType const& x, TPointType const& pt) const
(possiblynoexcept
,inline
and/orconstexpr
also).
In form (1): the call operator should change
res
in-place to contain the image of the pointpt
under the right action of the elementx
. The purpose of the 1st parameter is to avoid repeated allocations of memory to hold temporary points that are discarded soon after they are created.In form (2): the call operator should return the image of the point
pt
under the right action of the elementx
.The third template parameter exists for SFINAE.
- Used by:
Action (in form (1))
SchreierSimsTraits (in form (2))
- Example
template <> struct ImageLeftAction<BMat8, BMat8> { void operator()(BMat8& res, BMat8 pt, BMat8 x) const noexcept { res = (x * pt).row_space_basis(); } };
- Template Parameters
TElementType – the type of the elements of a semigroup.
TPointType – the type of the points acted on.
-
using libsemigroups::SchreierSimsTraits::Degree = ::libsemigroups::Degree<element_type>¶
Adapter for the degree of an element.
Defined in
adapters.hpp
.Specialisations of this struct should be stateless trivially default constructible with a call operator of signature
size_t operator()(TElementType const& x) const
(possiblynoexcept
,inline
and/orconstexpr
also).The return value of the call operator ought to indicate the degree of a
TElementType
instance which may or may not depend on the parameterx
. The degree of a permutation, for instance, would be the the number of points it acts on, the degree of a matrix is its dimension, and so on. This is used, for example, by SchreierSimsTraits in some member functions to determine whether it is known a priori that a permutation does not belong to the object, because it acts on too many points.- Used by:
- Example
template <> struct Degree<BMat8> { constexpr inline size_t operator()(BMat8 const&) const noexcept { return 8; } };
- Template Parameters
TElementType – the type of the elements of a semigroup.
TSfinae – this template parameter can be used for SFINAE.
-
using libsemigroups::SchreierSimsTraits::EqualTo = ::libsemigroups::EqualTo<element_type>¶
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::SchreierSimsTraits::Inverse = ::libsemigroups::Inverse<element_type>¶
Adapter for increasing the degree of an element.
Defined in
adapters.hpp
.Specialisations of this struct should be stateless trivially default constructible with a call operator of signature
void operator()(TElementType& x, size_t n) const
(possiblynoexcept
,inline
and/orconstexpr
also).The call operator should change the first argument in-place so that if
m = Degree<TElementType>()(x)
, then after the call toIncreaseDegree<TElementType>()(x, n)
,Degree<TElementType>()(x)
returnsm + n
. This only makes sense for certain types of elements, such as permutations, transformations, or matrices, and not for other types of object. In the latter case, the call operator should simply do nothing. This is used, for example, in the member function FroidurePin::closure, when one of the generators being added has degree larger than the existing generators.The second template parameter exists for SFINAE.
- Used by:
- Example
template <typename TIntegralType> struct IncreaseDegree< TIntegralType, typename std::enable_if<std::is_integral<TIntegralType>::value>::type> { void operator()(TIntegralType&, size_t) const noexcept { } };
- Template Parameters
TElementType – the type of the elements of a semigroup.
-
using libsemigroups::SchreierSimsTraits::One = ::libsemigroups::One<element_type>¶
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::SchreierSimsTraits::Product = ::libsemigroups::Product<element_type>¶
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::SchreierSimsTraits::Swap = ::libsemigroups::Swap<element_type>¶
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.