Inverse¶
-
template<typename TElementType, typename = void>
struct Inverse¶ Adapter for the inverse of an element.
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
(possiblynoexcept
,inline
and/orconstexpr
also).The call operator should return the inverse of the element
x
under the assumption thatx
has an inverse (in the sense of groups). For example, ifx
is a permutation, then this would return its inverse. Ifx
is a permutation matrix of type BMat8, then this operator would return its transpose.The second template parameter exists for SFINAE.
- 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(); } };
- Template Parameters
TElementType – the type of the elements of a semigroup.