One¶
-
using
libsemigroups::SchreierSims::One= typename TTraits::One¶ Defined in
adapters.hpp.Specialisations of this struct should be stateless trivially default constructible with two call operator of signatures:
TElementType operator()(size_t n) const(possiblynoexcept,inlineand/orconstexpralso) returning a multiplicative identity element for the categoryTElementTypeand withDegree<TElementType>()(x)equal to the parametern. For example, ifTElementTypeis a type of n x n matrices, then this should return the n x n identity matrix.TElementType operator()(T const&) const(possiblynoexcept,inlineand/orconstexpralso). This could be implemented as:TElementType operator()(TElementType const& x) const noexcept { return this->operator()(Degree<TElementType>()(x)); }
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 <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(); } };