Iterators

This page contains information about the member functions of the ToddCoxeter class providing iterators to normal forms.

inline class_iterator libsemigroups::congruence::ToddCoxeter::cbegin_class(class_index_type i, size_t min = 0, size_t max = POSITIVE_INFINITY) const

Returns a class_iterator pointing at the shortlex least word in an class.

Returns a const iterator pointing to the shortlex least word in the class with index i. When incremented this iterator will point at the shortlex next least word in the class with index i. In this way, all words belonging to the class with index i can be obtained.

Warning

This function does not trigger any enumeration!

Parameters
  • i – the index of the class

  • min – the minimum length of a word (defaults to 0)

  • max – the maximum length of a word (defaults to POSITIVE_INFINITY).

Throws

(None) – This function guarantees not to throw a LibsemigroupsException.

Returns

A value of type class_iterator.

inline class_iterator libsemigroups::congruence::ToddCoxeter::cbegin_class(word_type const &w, size_t min = 0, size_t max = POSITIVE_INFINITY)

Returns a class_iterator pointing at the shortlex least word in a class.

Returns a const iterator pointing to the shortlex least word in the class of the word w. When incremented this iterator will point at the shortlex next least word in the class of w. In this way, all words belonging to the class of w can be obtained.

Parameters
  • w – the word of the class

  • min – the minimum length of a word (defaults to 0)

  • max – the maximum length of a word (defaults to POSITIVE_INFINITY).

Throws

(None) – This function guarantees not to throw a LibsemigroupsException.

Returns

A value of type class_iterator.

inline std::vector<word_type>::const_iterator libsemigroups::congruence::ToddCoxeter::cbegin_extra() const noexcept

Returns a const iterator pointing at the first word in a generating pair.

Returns a const iterator pointing to the word in the first generating pair of the congruence represented by a ToddCoxeter instance. This will often (but not always) be the same as the first component in the pair pointed at by cbegin_generating_pairs().

Parameters

(None)

Throws

(None) – This function guarantees not to throw a LibsemigroupsException.

Returns

A value of type std::vector<word_type>::const_iterator.

inline normal_form_iterator libsemigroups::congruence::ToddCoxeter::cbegin_normal_forms()

Returns a normal_form_iterator pointing at the first normal form.

Returns a const iterator pointing to the normal form of the first class of the congruence represented by an instance of ToddCoxeter. The order of the classes, and the normal form, that is returned are controlled by standardize(order).

Parameters

(None)

Throws

(None) – This function guarantees not to throw a LibsemigroupsException.

Returns

A value of type normal_form_iterator.

inline std::vector<word_type>::const_iterator libsemigroups::congruence::ToddCoxeter::cbegin_relations() const noexcept

Returns a const iterator pointing at the first word in the first defining relation (if any).

Returns a const iterator pointing to the first word in the first defining relation of the underlying semigroup of the congruence represented by an instance of ToddCoxeter.

Parameters

(None)

Throws

(None) – This function guarantees not to throw a LibsemigroupsException.

Returns

A value of type std::vector<word_type>::const_iterator.

inline class_iterator libsemigroups::congruence::ToddCoxeter::cend_class() const

Returns a class_iterator pointing one past the last word in a class.

Returns a const iterator pointing one past the last word in any class.

Parameters

(None)

Warning

This function does not trigger any enumeration!

Throws

(None) – This function guarantees not to throw a LibsemigroupsException.

Returns

A value of type class_iterator.

inline std::vector<word_type>::const_iterator libsemigroups::congruence::ToddCoxeter::cend_extra() const noexcept

Returns a const iterator pointing one after the last word in any generating pair.

Parameters

(None)

Throws

(None) – This function guarantees not to throw a LibsemigroupsException.

Returns

A value of type std::vector<word_type>::const_iterator.

inline normal_form_iterator libsemigroups::congruence::ToddCoxeter::cend_normal_forms()

Returns a normal_form_iterator pointing one past the last normal form.

Returns a const iterator one past the normal form of the last class of the congruence represented by an instance of ToddCoxeter. The order of the classes, and the normal form, that is returned are controlled by standardize(order).

Parameters

(None)

Throws

(None) – This function guarantees not to throw a LibsemigroupsException.

Returns

A value of type normal_form_iterator.

inline std::vector<word_type>::const_iterator libsemigroups::congruence::ToddCoxeter::cend_relations() const noexcept

Returns a const iterator pointing one after the last word in the last defining relation (if any).

Returns a const iterator pointing one after the last word in the last defining relation of the underlying semigroup of the congruence represented by an instance of ToddCoxeter.

Parameters

(None)

Throws

(None) – This function guarantees not to throw a LibsemigroupsException.

Returns

A value of type std::vector<word_type>::const_iterator.