Product¶
-
template<>
usinglibsemigroups::FroidurePin<TElementType, TTraits>
::
Product
= typename TTraits::Product¶ 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.The second template parameter exists for SFINAE in overload resolution.
- Template Parameters
TElementType
: the type of the elements of a semigroup.
- Used by:
CongruenceByPairs
- 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; } };