IncreaseDegree

template<typename TElementType, typename = void>
struct IncreaseDegree

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 (possibly noexcept, inline and/or constexpr also).

The call operator should change the first argument in-place so that if m = Degree<TElementType>()(x), then after the call to IncreaseDegree<TElementType>()(x, n), Degree<TElementType>()(x) returns m + 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.