libsemigroups  v3.0.0
C++ library for semigroups and monoids
Loading...
Searching...
No Matches
SchreierSimsTraits< N, Point, Element >
template<size_t N, typename Point, typename Element>
struct libsemigroups::SchreierSimsTraits< N, Point, Element >

Defined in schreier-sims.hpp.

This is a traits class for use with the class template SchreierSims.

This traits class contains stateless types which are used to adapt any class representing a permutation for the implementation of the Schreier-Sims algorithm in the SchreierSims class template.

Template Parameters
Nthe largest point not fixed by the permutations in the permutation group to be represented by a SchreierSims instance.
Pointthe type of the points acted on.
Elementthe type of the group elements acting on Point.

Public Types

using Action = libsemigroups::ImageRightAction<element_type, Point>
 Adapter for the value of a right action.
 
using Degree = libsemigroups::Degree<element_type>
 Adapter for the degree of an element.
 
using domain_type = detail::IntRange<Point>
 Type of the object containing all points acted on.
 
using element_type = Element
 Type of the elements.
 
using EqualTo = libsemigroups::EqualTo<element_type>
 Adapter for testing equality.
 
using index_type = size_t
 The type of indices to be used by a SchreierSims instance.
 
using Inverse = libsemigroups::Inverse<element_type>
 Adapter for increasing the degree of an element.
 
using One = libsemigroups::One<element_type>
 Adapter for the identity element of the given type.
 
using point_type = Point
 Type of the points acted on.
 
using Product = libsemigroups::Product<element_type>
 Adapter for the product of two elements.
 
using Swap = libsemigroups::Swap<element_type>
 Adapter for swapping.
 

Member Typedef Documentation

◆ Action

template<size_t N, typename Point, typename Element>
using Action = libsemigroups::ImageRightAction<element_type, Point>

Defined in adapters.hpp.

Specialisations of this struct should be stateless trivially default constructible with a call operator of signature:

  1. void operator()(Point&, Element const&, Point const&) const (possibly noexcept, inline and/or constexpr also); or
  2. Point operator()(Element const&, Point const&) const (possibly noexcept, inline and/or constexpr also).

In form (1): the call operator should change res in-place to contain the image of the point pt under the right action of the element x. The purpose of the 1st parameter is to avoid repeated allocations of memory to hold temporary points that are discarded soon after they are created.

In form (2): the call operator should return the image of the point pt under the right action of the element x.

Template Parameters
Elementthe type of the elements of a semigroup.
Pointthe type of the points acted on.

The third template parameter exists for SFINAE.

Used by:
Example
template <>
void operator()(BMat8& res, BMat8 pt, BMat8 x) const noexcept {
res = (x * pt).row_space_basis();
}
};
Fast boolean matrices of dimension up to 8 x 8.
Definition bmat8.hpp:74
Adapter for the value of a left action.
Definition adapters.hpp:350

◆ Degree

template<size_t N, typename Point, typename Element>
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.

Template Parameters
Elementthe type of the elements of a semigroup.

The second template parameter exists for SFINAE.

Used by:
Example
template <>
struct Degree<BMat8> {
constexpr inline size_t operator()(BMat8 const&) const noexcept {
return 8;
}
};
libsemigroups::Degree< element_type > Degree
Adapter for the degree of an element.
Definition schreier-sims.hpp:125

◆ domain_type

template<size_t N, typename Point, typename Element>
using domain_type = detail::IntRange<Point>

Type of the object containing all points acted on.

◆ element_type

template<size_t N, typename Point, typename Element>
using element_type = Element

Type of the elements.

◆ EqualTo

template<size_t N, typename Point, typename Element>
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.

Template Parameters
Valuethe type of objects to compare.

The second template parameter exists for SFINAE.

Used by:

◆ index_type

template<size_t N, typename Point, typename Element>
using index_type = size_t

The type of indices to be used by a SchreierSims instance.

◆ Inverse

template<size_t N, typename Point, typename Element>
using Inverse = libsemigroups::Inverse<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.

Template Parameters
Elementthe type of the elements of a semigroup.

The second template parameter exists for SFINAE.

Used by:
Example
template <typename Integral>
Integral,
typename std::enable_if<std::is_integral<Integral>::value>::type>
{
void operator()(Integral&, size_t) const noexcept {
}
};
Adapter for increasing the degree of an element.
Definition adapters.hpp:199

◆ One

template<size_t N, typename Point, typename Element>
using One = libsemigroups::One<element_type>

Specialisations of this struct should be stateless trivially default constructible with two call operator of signatures:

  1. 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.
  2. Element operator()(T const&) const (possibly noexcept, inline and/or constexpr also). This could be implemented as:
    Element operator()(Element const& x) const noexcept {
    return this->operator()(Degree<Element>()(x));
    }
Template Parameters
Elementthe type of the elements of a semigroup.

The second template parameter exists for SFINAE.

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();
}
};
libsemigroups::One< element_type > One
Adapter for the identity element of the given type.
Definition schreier-sims.hpp:134

◆ point_type

template<size_t N, typename Point, typename Element>
using point_type = Point

The type of the points acted on by the group represented by this, which is the same as the template parameter Point.

◆ Product

template<size_t N, typename Point, typename Element>
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.

Template Parameters
Elementthe type of the elements of a semigroup.

The second template parameter exists for SFINAE.

Used by:
Example
template <>
struct Product<size_t> {
void operator()(size_t& xy, size_t x, size_t y, size_t = 0) const
noexcept {
xy = x * y;
}
};
libsemigroups::Product< element_type > Product
Adapter for the product of two elements.
Definition schreier-sims.hpp:137

◆ Swap

template<size_t N, typename Point, typename Element>
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.

Template Parameters
Valuethe type of objects to swap.

The second template parameter exists for SFINAE.

Used by:

The documentation for this struct was generated from the following file: