![]() |
libsemigroups
v3.0.0
C++ library for semigroups and monoids
|
Defined in froidure-pin.hpp
.
This is a traits class for use with FroidurePin.
Element | the type of the elements. |
State | the type of the state (if any, defaults to void , meaning none). |
Public Types | |
using | Complexity = ::libsemigroups::Complexity<element_type> |
Adapter for the complexity of multiplication. | |
using | Degree = ::libsemigroups::Degree<element_type> |
Adapter for the degree of an element. | |
using | element_type = typename detail::BruidhinnTraits<Element>::value_type |
The type of the elements of a FroidurePin instance. | |
using | EqualTo = ::libsemigroups::EqualTo<element_type> |
Adapter for testing equality. | |
using | Hash = ::libsemigroups::Hash<element_type> |
Adapter for hashing. | |
using | IncreaseDegree = ::libsemigroups::IncreaseDegree<element_type> |
Adapter for increasing the degree of an element. | |
using | Less = ::libsemigroups::Less<element_type> |
Adapter for comparisons. | |
using | One = ::libsemigroups::One<element_type> |
Adapter for the identity element of the given type. | |
using | Product = ::libsemigroups::Product<element_type> |
Adapter for the product of two elements. | |
using | state_type = State |
The type of the state (if any). | |
using | Swap = ::libsemigroups::Swap<element_type> |
Adapter for swapping. | |
using Complexity = ::libsemigroups::Complexity<element_type> |
Defined in adapters.hpp
.
Specialisations of this struct should be stateless trivially default constructible with a call operator of signature size_t operator()(Element const& x) const
(possibly noexcept
, inline
and/or constexpr
also).
The return value of the call operator ought to indicate the approximate complexity of multiplying two instances of Element
, which may or may not depend on the parameter x
. 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.
Element | the type of the elements of a semigroup. |
The second template parameter exists for SFINAE.
using Degree = ::libsemigroups::Degree<element_type> |
Defined in adapters.hpp
.
Specialisations of this struct should be stateless trivially default constructible with a call operator of signature size_t operator()(Element const& x) const
(possibly noexcept
, inline
and/or constexpr
also).
The return value of the call operator ought to indicate the degree of a Element
instance which may or may not depend on the parameter x
. The degree of a permutation, for instance, would be the the number of points it acts on, the degree of a matrix is its dimension, and so on. This is used, for example, by SchreierSimsTraits in some member functions to determine whether it is known a priori that a permutation does not belong to the object, because it acts on too many points.
Element | the type of the elements of a semigroup. |
The second template parameter exists for SFINAE.
using element_type = typename detail::BruidhinnTraits<Element>::value_type |
This type has const removed, and if Element
is a pointer to const, then the second const is also removed.
using EqualTo = ::libsemigroups::EqualTo<element_type> |
Defined in adapters.hpp
.
This type should be a stateless trivially default constructible with a call operator of signature bool operator()(Value const&, Value const&)
(possibly noexcept
, inline
and/or constexpr
also) for use with, for example, std::unordered_map.
Value | the type of objects to compare. |
The second template parameter exists for SFINAE.
using Hash = ::libsemigroups::Hash<element_type> |
Defined in adapters.hpp
.
This type should be a stateless trivially default constructible with a call operator of signature size_t operator()(Value const&)
for use with, for example, std::unordered_map.
Value | the type of objects to compare. |
The second template parameter exists for SFINAE.
using IncreaseDegree = ::libsemigroups::IncreaseDegree<element_type> |
Defined in adapters.hpp
.
Specialisations of this struct should be stateless trivially default constructible with a call operator of signature void operator()(Element& 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<Element>()(x)
, then after the call to IncreaseDegree<Element>()(x, n)
, Degree<Element>()(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.
Element | the type of the elements of a semigroup. |
The second template parameter exists for SFINAE.
using Less = ::libsemigroups::Less<element_type> |
Defined in adapters.hpp
.
This type should be a stateless trivially default constructible with a call operator of signature bool operator()(Value const&, Value const&)
(possibly noexcept
, inline
and/or constexpr
also) which defines a linear order on the objects of type Value.
Value | the type of objects to compare. |
The second template parameter exists for SFINAE.
using One = ::libsemigroups::One<element_type> |
Specialisations of this struct should be stateless trivially default constructible with two call operator of signatures:
Element operator()(size_t n) const
(possibly noexcept
, inline
and/or constexpr
also) returning a multiplicative identity element for the category Element
and with Degree<Element>()(x)
equal to the parameter n
. For example, if Element
is a type of n x n matrices, then this should return the n x n identity matrix.Element operator()(T const&) const
(possibly noexcept
, inline
and/or constexpr
also). This could be implemented as: Element | the type of the elements of a semigroup. |
The second template parameter exists for SFINAE.
using Product = ::libsemigroups::Product<element_type> |
Defined in adapters.hpp
.
Specialisations of this struct should be stateless trivially default constructible with a call operator of signature void operator()(Element&, Element const&, Element const&, size_t = 0)
(possibly noexcept
, inline
and/or constexpr
also).
The call operator should change xy
in-place to be the product of x
and y
. The 4th parameter is optional and it can be used as an index for static thread local storage, that might be required for forming the product of x
and y
. The purpose of the 1st parameter is to avoid repeated allocations of memory to hold temporary products that are discarded soon after they are created.
Element | the type of the elements of a semigroup. |
The second template parameter exists for SFINAE.
using state_type = State |
This type can be used to store some state that might be required in an FroidurePin instance.
using Swap = ::libsemigroups::Swap<element_type> |
Defined in adapters.hpp
.
This type should be a stateless trivially default constructible with a call operator of signature void operator()(Value&, Value&)
(possibly noexcept
, inline
and/or constexpr
also) which swaps its arguments.
Value | the type of objects to swap. |
The second template parameter exists for SFINAE.