Complexity¶
-
template<typename TElementType, typename = void>
struct Complexity¶ Adapter for the complexity of multiplication.
Defined in
adapters.hpp
.Specialisations of this struct should be stateless trivially default constructible with a call operator of signature
size_t operator()(TElementType const& x) const
(possiblynoexcept
,inline
and/orconstexpr
also).The return value of the call operator ought to indicate the approximate complexity of multiplying two instances of
TElementType
, which may or may not depend on the parameterx
. This is used, for example, by FroidurePin in some member functions to determine whether it is better to multiply elements or to follow a path in the Cayley graph.The second template parameter exists for SFINAE.
- Used by:
- Example
template <> struct Complexity<KBE> { constexpr size_t operator()(KBE const&) const noexcept { return LIMIT_MAX; } };
- Template Parameters
TElementType – the type of the elements of a semigroup.