19#ifndef LIBSEMIGROUPS_MATRIX_ADAPTERS_HPP_
20#define LIBSEMIGROUPS_MATRIX_ADAPTERS_HPP_
25#include "adapters.hpp"
27#include "is-matrix.hpp"
56 template <
typename Mat>
71 [[nodiscard]]
constexpr size_t operator()(Mat
const& x)
const noexcept {
72 return x.number_of_rows() * x.number_of_rows() * x.number_of_rows();
86 template <
typename Mat>
87 struct Degree<Mat,
std::enable_if_t<IsMatrix<Mat>>> {
100 [[nodiscard]]
constexpr size_t operator()(Mat
const& x)
const noexcept {
101 return x.number_of_rows();
115 template <
typename Mat>
116 struct Hash<Mat,
std::enable_if_t<IsMatrix<Mat>>> {
129 [[nodiscard]]
constexpr size_t operator()(Mat
const& x)
const {
130 return x.hash_value();
149 template <
typename Mat>
156 LIBSEMIGROUPS_ASSERT(
false);
173 template <
typename Mat>
174 struct One<Mat,
std::enable_if_t<IsMatrix<Mat>>> {
203 template <
typename Mat>
224 operator()(Mat& xy, Mat
const& x, Mat
const& y,
size_t = 0)
const {
225 xy.product_inplace_no_checks(x, y);
Namespace for everything in the libsemigroups library.
Definition action.hpp:44
constexpr size_t operator()(Mat const &x) const noexcept
Call operator.
Definition matrix-adapters.hpp:71
Adapter for the complexity of multiplication.
Definition adapters.hpp:128
constexpr size_t operator()(Mat const &x) const noexcept
Call operator.
Definition matrix-adapters.hpp:100
Adapter for the degree of an element.
Definition adapters.hpp:166
constexpr size_t operator()(Mat const &x) const
Call operator.
Definition matrix-adapters.hpp:129
Adapter for hashing.
Definition adapters.hpp:451
constexpr void operator()(Mat &, size_t) const noexcept
Call operator.
Definition matrix-adapters.hpp:154
Adapter for increasing the degree of an element.
Definition adapters.hpp:206
Mat operator()(Mat const &x) const
Call operator.
Definition matrix-adapters.hpp:188
Adapter for the identity element of the given type.
Definition adapters.hpp:251
void operator()(Mat &xy, Mat const &x, Mat const &y, size_t=0) const
Call operator.
Definition matrix-adapters.hpp:224
Adapter for the product of two elements.
Definition adapters.hpp:289