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.

Exceptions

This function guarantees not to throw a LibsemigroupsException.

See

KnuthBendix::cend_normal_forms.

Warning

Copying iterators of this type is expensive. As a consequence, prefix incrementing ++it the iterator it returned by cbegin_normal_forms is significantly cheaper than postfix incrementing it++.

Warning

If the finitely presented semigroup represented by this is infinite then max should be chosen with some care.

Parameters
  • lphbt – the alphabet to use for the normal forms

  • min – the minimum length of a normal form

  • max – one larger than the maximum length of a normal form.

Returns

A value of type const_normal_form_iterator.