cbegin_normal_forms(std::string const&, size_t const, size_t const)¶
-
const_normal_form_iterator
libsemigroups::fpsemigroup::KnuthBendix
::
cbegin_normal_forms
(std::string const &lphbt, size_t const min, size_t const max)¶ Returns a forward iterator pointing at the first normal form whose length is in the given range using the specified alphabet.
If incremented, the iterator will point to the next least short-lex normal form (if it’s less than
max
in length). Iterators of the type returned by this function should only be compared with other iterators created from the same KnuthBendix instance.- Return
A value of type
const_normal_form_iterator
.- Exceptions
This function guarantees not to throw a LibsemigroupsException.
- Warning
Copying iterators of this type is expensive. As a consequence, prefix incrementing
++it
the iteratorit
returned bycbegin_normal_forms
is significantly cheaper than postfix incrementingit++
.- Warning
If the finitely presented semigroup represented by
this
is infinite thenmax
should be chosen with some care.- See
- Parameters
lphbt
: the alphabet to use for the normal formsmin
: the minimum length of a normal formmax
: one larger than the maximum length of a normal form.