25#ifndef LIBSEMIGROUPS_DETAIL_TCE_HPP_
26#define LIBSEMIGROUPS_DETAIL_TCE_HPP_
33#include "libsemigroups/adapters.hpp"
34#include "libsemigroups/constants.hpp"
35#include "libsemigroups/todd-coxeter.hpp"
41 struct FroidurePinState;
47 using node_type =
typename ToddCoxeterImpl::node_type;
48 using word_graph_type =
typename ToddCoxeterImpl::word_graph_type;
50 TCE() noexcept = default;
51 TCE(TCE const&) noexcept = default;
52 TCE(TCE&&) noexcept = default;
53 TCE& operator=(TCE const&) noexcept = default;
54 TCE& operator=(TCE&&) noexcept = default;
57 explicit TCE(node_type i) noexcept : _index(i) {}
59 bool operator==(TCE
const& that)
const noexcept {
60 return _index == that._index;
63 bool operator<(TCE
const& that)
const noexcept {
64 return _index < that._index;
67 TCE one() const noexcept {
71 operator node_type()
const {
86 static_assert(std::is_trivial<TCE>::value,
"TCE is not trivial!!!");
87 static_assert(std::integral_constant<bool, (
sizeof(TCE) <= 8)>::value,
88 "TCE's sizeof exceeds 8!!");
93 detail::TCE
const& x) {
94 os <<
"TCE(" << detail::TCE::node_type(x) <<
")";
100 os << ::libsemigroups::detail::to_string(x);
106 struct Complexity<detail::TCE> {
114 constexpr size_t operator()(detail::TCE
const&)
const noexcept {
120 struct Degree<detail::TCE> {
121 constexpr size_t operator()(detail::TCE
const&)
const noexcept {
128 void operator()(detail::TCE
const&,
size_t)
const noexcept {}
133 struct One<detail::TCE> {
135 detail::TCE operator()(detail::TCE
const& x)
const noexcept {
142 void operator()(detail::TCE& xy,
143 detail::TCE
const& x,
144 detail::TCE
const& y,
145 detail::TCE::word_graph_type* t,
148 xy = detail::TCE(t->target_no_checks(x, y - 1));
153 struct FroidurePinState<detail::TCE> {
154 using type =
typename detail::ToddCoxeterImpl::word_graph_type;
160 struct hash<libsemigroups::detail::TCE> {
161 using node_type = libsemigroups::detail::TCE::node_type;
162 size_t operator()(libsemigroups::detail::TCE
const& x)
const noexcept {
163 return std::hash<node_type>()(x);
std::ostringstream & operator<<(std::ostringstream &os, BMat8 const &x)
Insertion operator.
LimitMax const LIMIT_MAX
Value for the maximum of something.
Namespace for everything in the libsemigroups library.
Definition action.hpp:44
Adapter for the degree of an element.
Definition adapters.hpp:159
Adapter for increasing the degree of an element.
Definition adapters.hpp:199
Adapter for the identity element of the given type.
Definition adapters.hpp:246
Adapter for the product of two elements.
Definition adapters.hpp:284