25#ifndef LIBSEMIGROUPS_HPCOMBI_HPP_
26#define LIBSEMIGROUPS_HPCOMBI_HPP_
34#if defined(LIBSEMIGROUPS_HPCOMBI_ENABLED)
36#pragma GCC diagnostic push
37#pragma GCC diagnostic ignored "-Wpedantic"
38#pragma GCC diagnostic ignored "-Wswitch-default"
40#include "hpcombi/hpcombi.hpp"
42#pragma GCC diagnostic pop
48#include <initializer_list>
52#include <unordered_map>
56#include "adapters.hpp"
58#include "exception.hpp"
59#include "is-transf.hpp"
63#if defined(LIBSEMIGROUPS_HPCOMBI_ENABLED) \
64 || defined(LIBSEMIGROUPS_PARSED_BY_DOXYGEN)
93 template <
typename Thing>
96 std::enable_if_t<std::is_base_of_v<HPCombi::PTransf16, Thing>>> {
125 template <
typename Thing>
128 std::enable_if_t<std::is_base_of_v<HPCombi::PTransf16, Thing>>> {
155 template <
typename Thing>
157 std::enable_if_t<std::is_base_of_v<HPCombi::PTransf16, Thing>>> {
203 template <
typename Thing>
206 std::enable_if_t<std::is_base_of_v<HPCombi::PTransf16, Thing>>> {
221 size_t deg = 0) const noexcept {
237 template <
typename Thing>
239 std::enable_if_t<std::is_base_of_v<HPCombi::PTransf16, Thing>>> {
265 template <
typename Thing>
268 std::enable_if_t<std::is_base_of_v<HPCombi::PTransf16, Thing>>> {
278 inline constexpr void operator()(Thing
const& x,
size_t n)
const noexcept {
303 HPCombi::Perm16
operator()(HPCombi::Perm16
const& x)
const noexcept {
318 template <
typename Int>
321 std::enable_if_t<std::is_integral_v<Int>>> {
337 HPCombi::Perm16
const& x)
const noexcept {
338 LIBSEMIGROUPS_ASSERT(pt < 16);
339 res =
static_cast<Int
>(x[pt]);
356 Int
operator()(Int
const& pt, HPCombi::Perm16
const& x)
const noexcept {
357 LIBSEMIGROUPS_ASSERT(pt < 16);
384 HPCombi::PPerm16
const& pt,
385 HPCombi::PPerm16
const& x)
const noexcept {
412 HPCombi::PPerm16
const& pt,
413 HPCombi::PPerm16
const& x)
const noexcept {
440 constexpr inline size_t operator()(HPCombi::BMat8
const& x)
const noexcept {
465 constexpr inline size_t operator()(HPCombi::BMat8
const& x)
const noexcept {
491 inline void operator()(HPCombi::BMat8
const& x,
size_t n)
const noexcept {
516 inline HPCombi::BMat8
operator()(
size_t n = 0) const noexcept {
518 return HPCombi::BMat8::one();
531 inline HPCombi::BMat8
operator()(HPCombi::BMat8
const& x)
const noexcept {
558 HPCombi::BMat8
const& x,
559 HPCombi::BMat8
const& y,
560 size_t deg = 0) const noexcept {
583 HPCombi::BMat8
const& pt,
584 HPCombi::BMat8
const& x)
const noexcept {
585 res = (pt * x).row_space_basis();
606 HPCombi::BMat8 x)
const noexcept {
607 res = (x * pt).col_space_basis();
623 inline HPCombi::BMat8
operator()(HPCombi::BMat8
const& x)
const noexcept {
627 return x.transpose();
680 HPCombi::BMat8
const& x)
const noexcept {
681 res = x.row_space_basis();
699 HPCombi::BMat8
const& x)
const noexcept {
700 res = x.col_space_basis();
716 inline size_t operator()(HPCombi::BMat8
const& x)
const noexcept {
717 return x.row_space_size();
762 struct Lambda<HPCombi::PPerm16, HPCombi::PPerm16> {
770 HPCombi::PPerm16
const& x)
const noexcept {
781 struct Rho<HPCombi::PPerm16, HPCombi::PPerm16> {
786 HPCombi::PPerm16
const& x)
const noexcept {
810 HPCombi::Transf16
const& x,
811 HPCombi::PTransf16
const& y)
const noexcept {
812 res = (y *
static_cast<HPCombi::PTransf16
>(
static_cast<HPCombi::epu8
>(x)))
832 HPCombi::Transf16
const& x,
833 HPCombi::Vect16
const& y)
const noexcept;
849 using type = HPCombi::PTransf16;
875 struct Lambda<HPCombi::Transf16, HPCombi::PTransf16> {
884 HPCombi::Transf16
const& x)
const noexcept {
897 struct Rho<HPCombi::Transf16, HPCombi::Vect16> {
905 HPCombi::Transf16
const& x)
const noexcept;
927 HPCombi::PTransf16
const& pt,
928 HPCombi::PTransf16
const& x)
const noexcept {
952 HPCombi::PTransf16
const& x,
953 HPCombi::Vect16
const& y)
const noexcept;
969 using type = HPCombi::PTransf16;
995 struct Lambda<HPCombi::PTransf16, HPCombi::PTransf16> {
1004 HPCombi::PTransf16
const& x)
const noexcept {
1019 struct Rho<HPCombi::PTransf16, HPCombi::Vect16> {
1027 HPCombi::PTransf16
const& x)
const noexcept;
1039 template <
typename T>
1041 std::enable_if_t<std::is_base_of_v<HPCombi::PTransf16, T>,
1089#ifndef LIBSEMIGROUPS_PARSED_BY_DOXYGEN
1090 template <
typename Return,
typename Container>
1092 make(Container&& cont);
1094 template <
typename Container>
1119#ifndef LIBSEMIGROUPS_PARSED_BY_DOXYGEN
1120 template <
typename Return,
typename Container>
1122 make(Container&& cont);
1124 template <
typename Container>
1149#ifndef LIBSEMIGROUPS_PARSED_BY_DOXYGEN
1150 template <
typename Return,
typename Container>
1152 make(Container&& cont);
1154 template <
typename Container>
1179#ifndef LIBSEMIGROUPS_PARSED_BY_DOXYGEN
1180 template <
typename Return,
typename Container>
1182 make(Container&& cont);
1184 template <
typename Container>
1209#ifndef LIBSEMIGROUPS_PARSED_BY_DOXYGEN
1210 template <
typename Return>
1216 [[nodiscard]] HPCombi::PTransf16
1244#ifndef LIBSEMIGROUPS_PARSED_BY_DOXYGEN
1245 template <
typename Return>
1251 [[nodiscard]] HPCombi::PPerm16
1280#ifndef LIBSEMIGROUPS_PARSED_BY_DOXYGEN
1281 template <
typename Return,
typename Int>
1291 template <
typename Int>
1292 [[nodiscard]] HPCombi::PPerm16
1298#ifndef LIBSEMIGROUPS_PARSED_BY_DOXYGEN
1322 template <
typename Return>
1323 [[nodiscard]] std::enable_if_t<std::is_base_of_v<HPCombi::PTransf16, Return>,
1332#include "hpcombi.tpp"
Fast boolean matrices of dimension up to 8 x 8.
Definition bmat8.hpp:74
enable_if_is_same< Return, Blocks > make(Container const &cont)
Check the arguments, construct a Blocks object, and check it.
Definition bipart.hpp:856
HPCombi::Transf16 make< HPCombi::Transf16 >(Container &&cont)
Construct a HPCombi::Transf16 from universal reference and check.
HPCombi::Perm16 make< HPCombi::Perm16 >(Container &&cont)
Construct a HPCombi::Perm16 from universal reference and check.
HPCombi::PTransf16 make< HPCombi::PTransf16 >(Container &&cont)
Construct a HPCombi::PTransf16 from universal reference and check.
HPCombi::PPerm16 make< HPCombi::PPerm16 >(Container &&cont)
Construct a HPCombi::PPerm16 from container and check.
PPerm< N, Scalar > left_one(PPerm< N, Scalar > const &f)
Returns the left one of a partial perm.
PPerm< N, Scalar > right_one(PPerm< N, Scalar > const &f)
Returns the right one of a partial perm.
std::enable_if_t< std::is_same_v< Given, Expected >, Expected > enable_if_is_same
Alias equal to the second template parameter if both template parameters are equal.
Definition types.hpp:48
Namespace for everything in the libsemigroups library.
Definition action.hpp:44
constexpr size_t operator()(HPCombi::BMat8 const &x) const noexcept
Returns 0.
Definition hpcombi.hpp:440
constexpr size_t operator()(Thing const &x) const noexcept
Returns 0.
Definition hpcombi.hpp:109
Adapter for the complexity of multiplication.
Definition adapters.hpp:128
constexpr size_t operator()(HPCombi::BMat8 const &x) const noexcept
Returns 8.
Definition hpcombi.hpp:465
constexpr size_t operator()(Thing const &x) const noexcept
Returns 16.
Definition hpcombi.hpp:139
Adapter for the degree of an element.
Definition adapters.hpp:166
void operator()(HPCombi::BMat8 &res, HPCombi::BMat8 pt, HPCombi::BMat8 x) const noexcept
Stores the image of pt under the left action of x.
Definition hpcombi.hpp:604
void operator()(HPCombi::PPerm16 &res, HPCombi::PPerm16 const &pt, HPCombi::PPerm16 const &x) const noexcept
Stores the idempotent in res.
Definition hpcombi.hpp:411
void operator()(HPCombi::Vect16 &res, HPCombi::PTransf16 const &x, HPCombi::Vect16 const &y) const noexcept
Store image of x under the left action of y.
void operator()(HPCombi::Vect16 &res, HPCombi::Transf16 const &x, HPCombi::Vect16 const &y) const noexcept
Store image of x under the left action of y.
Adapter for the value of a left action.
Definition adapters.hpp:357
void operator()(HPCombi::BMat8 &res, HPCombi::BMat8 const &pt, HPCombi::BMat8 const &x) const noexcept
Store the image of pt under the right action of x.
Definition hpcombi.hpp:582
void operator()(HPCombi::PPerm16 &res, HPCombi::PPerm16 const &pt, HPCombi::PPerm16 const &x) const noexcept
Stores the idempotent in res.
Definition hpcombi.hpp:383
void operator()(HPCombi::PTransf16 &res, HPCombi::PTransf16 const &pt, HPCombi::PTransf16 const &x) const noexcept
Store the image of x under the right action of y.
Definition hpcombi.hpp:926
void operator()(Int &res, Int const &pt, HPCombi::Perm16 const &x) const noexcept
Stores the image of pt under p.
Definition hpcombi.hpp:335
Int operator()(Int const &pt, HPCombi::Perm16 const &x) const noexcept
Stores the image of pt under p.
Definition hpcombi.hpp:356
void operator()(HPCombi::PTransf16 &res, HPCombi::Transf16 const &x, HPCombi::PTransf16 const &y) const noexcept
Store the image of x under the right action of y.
Definition hpcombi.hpp:809
Adapter for the value of a right action.
Definition adapters.hpp:399
void operator()(HPCombi::BMat8 const &x, size_t n) const noexcept
Does nothing.
Definition hpcombi.hpp:491
constexpr void operator()(Thing const &x, size_t n) const noexcept
Does nothing.
Definition hpcombi.hpp:278
Adapter for increasing the degree of an element.
Definition adapters.hpp:206
HPCombi::BMat8 operator()(HPCombi::BMat8 const &x) const noexcept
Returns the group inverse of x.
Definition hpcombi.hpp:623
HPCombi::Perm16 operator()(HPCombi::Perm16 const &x) const noexcept
Returns the inverse of x.
Definition hpcombi.hpp:303
Adapter for the inverse of an element.
Definition adapters.hpp:326
void operator()(HPCombi::BMat8 &res, HPCombi::BMat8 const &x) const noexcept
Store the lambda value of x as used in the Konieczny algorithm.
Definition hpcombi.hpp:679
void operator()(HPCombi::PPerm16 &res, HPCombi::PPerm16 const &x) const noexcept
Definition hpcombi.hpp:769
void operator()(HPCombi::PTransf16 &res, HPCombi::PTransf16 const &x) const noexcept
Stores the identity function on the image of x.
Definition hpcombi.hpp:1003
void operator()(HPCombi::PTransf16 &res, HPCombi::Transf16 const &x) const noexcept
Stores the identity function on the image of x.
Definition hpcombi.hpp:883
Adapter for the action on LambdaValue's.
Definition adapters.hpp:840
HPCombi::BMat8 type
The type of Lambda value.
Definition hpcombi.hpp:648
HPCombi::PPerm16 type
The type of Lambda values.
Definition hpcombi.hpp:737
HPCombi::PTransf16 type
The type of Lambda values.
Definition hpcombi.hpp:969
HPCombi::PTransf16 type
The type of Lambda values.
Definition hpcombi.hpp:849
Adapter for lambda functions.
Definition adapters.hpp:800
HPCombi::BMat8 operator()(HPCombi::BMat8 const &x) const noexcept
Returns the identity HPCombi::BMat8.
Definition hpcombi.hpp:531
HPCombi::BMat8 operator()(size_t n=0) const noexcept
Returns the identity HPCombi::BMat8.
Definition hpcombi.hpp:516
Thing operator()(size_t n=0) const noexcept
Returns the identity for a derived class of HPCombi::PTransf16.
Definition hpcombi.hpp:168
Thing operator()(Thing const &x) const noexcept
Returns the identity for a derived class of HPCombi::PTransf16.
Definition hpcombi.hpp:183
Adapter for the identity element of the given type.
Definition adapters.hpp:253
void operator()(HPCombi::BMat8 &xy, HPCombi::BMat8 const &x, HPCombi::BMat8 const &y, size_t deg=0) const noexcept
Modifies xy in-place to be the product of x and y.
Definition hpcombi.hpp:557
void operator()(Thing &xy, Thing const &x, Thing const &y, size_t deg=0) const noexcept
Modifies xy in-place to be the product of x and y.
Definition hpcombi.hpp:218
Adapter for the product of two elements.
Definition adapters.hpp:291
size_t operator()(HPCombi::BMat8 const &x) const noexcept
Returns the rank of x as used in the Konieczny algorithm.
Definition hpcombi.hpp:716
size_t operator()(T const &x) const noexcept
Returns the rank of x as used in the Konieczny algorithm.
Definition hpcombi.hpp:1055
Adapter for calculating ranks.
Definition adapters.hpp:937
void operator()(HPCombi::BMat8 &res, HPCombi::BMat8 const &x) const noexcept
Store the rho value of x as used in the Konieczny algorithm.
Definition hpcombi.hpp:698
void operator()(HPCombi::PPerm16 &res, HPCombi::PPerm16 const &x) const noexcept
Definition hpcombi.hpp:785
void operator()(HPCombi::Vect16 &res, HPCombi::PTransf16 const &x) const noexcept
Stores the kernel of x.
void operator()(HPCombi::Vect16 &res, HPCombi::Transf16 const &x) const noexcept
Stores the kernel of x.
Adapter for the action on RhoValue's.
Definition adapters.hpp:861
HPCombi::BMat8 type
The type of Rho values for HPCombi::BMat8.
Definition hpcombi.hpp:664
HPCombi::PPerm16 type
The type of Rho values.
Definition hpcombi.hpp:752
HPCombi::Vect16 type
The type of Rho value for HPCombi::PTransf16.
Definition hpcombi.hpp:984
HPCombi::Vect16 type
The type of Rho value for HPCombi::Transf16.
Definition hpcombi.hpp:864
Adapter for rho functions.
Definition adapters.hpp:819
void operator()(Thing &x, Thing &y) const noexcept
Swap x and y.
Definition hpcombi.hpp:249
Adapter for swapping.
Definition adapters.hpp:673