22#ifndef LIBSEMIGROUPS_DETAIL_KNUTH_BENDIX_NF_HPP_
23#define LIBSEMIGROUPS_DETAIL_KNUTH_BENDIX_NF_HPP_
27#include "libsemigroups/paths.hpp"
28#include "libsemigroups/to-froidure-pin.hpp"
29#include "libsemigroups/types.hpp"
33 template <
typename Word,
typename Rewriter,
typename ReductionOrder>
38 template <
typename Word,
typename Rewriter,
typename ReductionOrder>
39 class KnuthBendixNormalFormRange :
public Paths<uint32_t> {
40 using Paths_ = Paths<uint32_t>;
42 mutable Word _current;
43 KnuthBendix<Word, Rewriter, ReductionOrder>* _kb;
47 using output_type = Word
const&;
49 explicit KnuthBendixNormalFormRange(
50 KnuthBendix<Word, Rewriter, ReductionOrder>& kb)
51 : Paths(kb.gilman_graph()), _current(), _kb(&kb) {
56 if (!kb.presentation().contains_empty_word()) {
61 KnuthBendixNormalFormRange();
62 KnuthBendixNormalFormRange(KnuthBendixNormalFormRange
const&);
63 KnuthBendixNormalFormRange(KnuthBendixNormalFormRange&&);
64 KnuthBendixNormalFormRange& operator=(KnuthBendixNormalFormRange
const&);
65 KnuthBendixNormalFormRange& operator=(KnuthBendixNormalFormRange&&);
67 ~KnuthBendixNormalFormRange();
69 output_type get()
const {
73 _current.push_back(_kb->presentation().letter_no_checks(c));
78 KnuthBendixNormalFormRange& min(size_type val)
noexcept {
83 KnuthBendixNormalFormRange& max(size_type val)
noexcept {
95 static constexpr bool is_finite =
true;
96 static constexpr bool is_idempotent =
true;
99 template <
typename Word,
typename Rewriter,
typename ReductionOrder>
100 KnuthBendixNormalFormRange<Word, Rewriter, ReductionOrder>::
101 KnuthBendixNormalFormRange()
104 template <
typename Word,
typename Rewriter,
typename ReductionOrder>
105 KnuthBendixNormalFormRange<Word, Rewriter, ReductionOrder>::
106 KnuthBendixNormalFormRange(KnuthBendixNormalFormRange
const&)
109 template <
typename Word,
typename Rewriter,
typename ReductionOrder>
110 KnuthBendixNormalFormRange<Word, Rewriter, ReductionOrder>::
111 KnuthBendixNormalFormRange(KnuthBendixNormalFormRange&&)
114 template <
typename Word,
typename Rewriter,
typename ReductionOrder>
115 KnuthBendixNormalFormRange<Word, Rewriter, ReductionOrder>&
116 KnuthBendixNormalFormRange<Word, Rewriter, ReductionOrder>::operator=(
117 KnuthBendixNormalFormRange
const&)
120 template <
typename Word,
typename Rewriter,
typename ReductionOrder>
121 KnuthBendixNormalFormRange<Word, Rewriter, ReductionOrder>&
122 KnuthBendixNormalFormRange<Word, Rewriter, ReductionOrder>::operator=(
123 KnuthBendixNormalFormRange&&)
126 template <
typename Word,
typename Rewriter,
typename ReductionOrder>
127 KnuthBendixNormalFormRange<Word, Rewriter, ReductionOrder>::
128 ~KnuthBendixNormalFormRange()
void next()
Definition paths.hpp:751
typename WordGraph< uint32_t >::size_type size_type
Definition paths.hpp:613
size_type min() const noexcept
Definition paths.hpp:970
Paths(WordGraph< Node > const &) -> Paths< Node >
Paths & min(size_type val) noexcept
Definition paths.hpp:957
Paths & max(size_type val) noexcept
Definition paths.hpp:986
size_type max() const noexcept
Definition paths.hpp:999
bool at_end() const
Definition paths.hpp:767
output_type get() const
Definition paths.hpp:738
uint64_t count() const
Definition paths.hpp:800
uint64_t size_hint() const
Paths & source_no_checks(node_type n) noexcept
Definition paths.hpp:831
std::vector< letter_type > word_type
Type for a word over the generators of a semigroup.
Definition types.hpp:101
Namespace for everything in the libsemigroups library.
Definition action.hpp:44