Inverse

template<>
using libsemigroups::SchreierSims<N, TPointType, TElementType, TTraits>::Inverse = typename TTraits::Inverse

Defined in adapters.hpp.

Specialisations of this struct should be stateless trivially default constructible with a call operator of signature TPointType operator()(TElementType const& x) const (possibly noexcept, inline and/or constexpr also).

The call operator should return the inverse of the element x under the assumption that x has an inverse (in the sense of groups). For example, if x is a permutation, then this would return its inverse. If x is a permutation matrix of type BMat8, then this operator would return its transpose.

The second template parameter exists for SFINAE in overload resolution.

Template Parameters
  • TElementType: the type of the elements of a semigroup.

Used by:

Example

template <>
struct Inverse<BMat8> {
  inline BMat8 operator()(BMat8 const& x) const noexcept {
    LIBSEMIGROUPS_ASSERT(x * x.transpose() == x.one());
    return x.transpose();
  }
};