cbegin_panislo¶
-
const_panislo_iterator
libsemigroups::ActionDigraph::cbegin_panislo(node_type const source, size_t const min = 0, size_t const max = POSITIVE_INFINITY) const¶ Returns a forward iterator pointing to a pair consisting of the edge labels of the first path (in short-lex order) starting at
sourcewith length in the range \([min, max)\) and the last node of that path.PANISLO = Path And Node In Short-Lex Order
If incremented, the iterator will point to the next least edge labelling of a path (in short-lex order), and its last node, with length in the range \([min, max)\). Iterators of the type returned by this function are equal whenever they point to equal objects.
- Return
An iterator
itof typeconst_panislo_iteratorpointing to a std::pair where:it->firstis a libsemigroups::word_type consisting of the edge labels of the first path (in short-lex order) fromsourceof length in the range \([min, max)\); andit->secondis the last node on the path fromsourcelabelled byit->first, a value of ActionDigraph::node_type.
- Warning
Copying iterators of this type is expensive. As a consequence, prefix incrementing
++itthe returned iteratoritsignificantly cheaper than postfix incrementingit++.- Warning
If the action digraph represented by
thiscontains a cycle that is reachable fromsource, then there are infinitely many paths starting atsource, and somaxshould be chosen with some care.- See
- Parameters
source: the source nodemin: the minimum length of a path to enumerate (defaults to0)max: the maximum length of a path to enumerate (defaults to libsemigroups::POSITIVE_INFINITY).
- Exceptions
LibsemigroupsException: ifsourceis not a node in the digraph.