libsemigroups  v3.1.2
C++ library for semigroups and monoids
Loading...
Searching...
No Matches
to-froidure-pin.hpp
1//
2// libsemigroups - C++ library for semigroups and monoids
3// Copyright (C) 2022-2025 James D. Mitchell
4//
5// This program is free software: you can redistribute it and/or modify
6// it under the terms of the GNU General Public License as published by
7// the Free Software Foundation, either version 3 of the License, or
8// (at your option) any later version.
9//
10// This program is distributed in the hope that it will be useful,
11// but WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13// GNU General Public License for more details.
14//
15// You should have received a copy of the GNU General Public License
16// along with this program. If not, see <http://www.gnu.org/licenses/>.
17//
18
19#ifndef LIBSEMIGROUPS_TO_FROIDURE_PIN_HPP_
20#define LIBSEMIGROUPS_TO_FROIDURE_PIN_HPP_
21
22#include <cstddef> // for size_t
23#include <memory> // for unique_ptr
24#include <type_traits> // for enable_if_t, is_base_of
25
26#include "cong-class.hpp" // for Congruence
27#include "froidure-pin.hpp" // for FroidurePin
28#include "kambites-class.hpp" // for Kambites
29#include "knuth-bendix-class.hpp" // for KnuthBendix
30#include "konieczny.hpp" // for Konieczny
31#include "todd-coxeter-class.hpp" // for ToddCoxeter
32
33#include "detail/kbe.hpp" // for KBE
34#include "detail/ke.hpp" // for KE
35#include "detail/tce.hpp" // for TCE
36
37namespace libsemigroups {
38
65
76
78 // Congruence
80
104 template <template <typename...> typename Thing, typename Word>
105 auto to(Congruence<Word>& cong)
106 -> std::enable_if_t<std::is_same_v<Thing<int>, FroidurePin<int>>,
108
110 // Kambites
112
141 template <template <typename...> typename Thing, typename Word>
142 auto to(Kambites<Word>& k) -> std::enable_if_t<
143 std::is_same_v<Thing<detail::KE<Word>>, FroidurePin<detail::KE<Word>>>,
145
147 // KnuthBendix
149
176 template <template <typename...> typename Thing,
177 typename Word,
178 typename Rewriter,
179 typename ReductionOrder>
180 auto to(KnuthBendix<Word, Rewriter, ReductionOrder>& kb) -> std::enable_if_t<
181 std::is_same_v<Thing<int>, FroidurePin<int>>,
183
207 template <template <typename...> typename Thing,
208 typename Element,
209 typename Traits>
211 -> std::enable_if_t<std::is_same_v<Thing<int>, FroidurePin<int>>,
213
215 // ToddCoxeter
217
246 template <template <typename...> typename Thing>
247 auto to(detail::ToddCoxeterImpl& tc) -> std::enable_if_t<
248 std::is_same_v<Thing<detail::TCE>, FroidurePin<detail::TCE>>,
250
252 // WordGraph
254
312 template <typename Result, typename Node>
313 auto to(WordGraph<Node> const& wg, size_t first, size_t last)
314 -> std::enable_if_t<
315 std::is_same_v<FroidurePin<typename Result::element_type>, Result>,
316 Result>;
317
326 template <typename Result, typename Node>
327 auto to(WordGraph<Node> const& wg) -> std::enable_if_t<
328 std::is_same_v<FroidurePin<typename Result::element_type>, Result>,
329 Result> {
330 return to<Result>(wg, 0, wg.number_of_nodes());
331 }
332} // namespace libsemigroups
333
334#include "to-froidure-pin.tpp"
335#endif // LIBSEMIGROUPS_TO_FROIDURE_PIN_HPP_
Class implementing the Froidure-Pin algorithm.
Definition froidure-pin.hpp:188
Class implementing Konieczny's algorithm.
Definition konieczny.hpp:179
Class for representing word graphs.
Definition word-graph.hpp:82
Namespace for everything in the libsemigroups library.
Definition action.hpp:44
auto to(detail::KnuthBendixImpl< Rewriter, ReductionOrder > &kb) -> std::enable_if_t< std::is_same_v< Presentation< typename Result::word_type >, Result >, Result >
No doc.