cbegin_pstilo¶
-
const_pstilo_iterator
libsemigroups::ActionDigraph
::
cbegin_pstilo
(node_type const source, node_type const target, size_t const min = 0, size_t const max = POSITIVE_INFINITY) const¶ Returns a forward iterator pointing to the edge labels of the first path (in lexicographical order) starting at the node
source
and ending at the nodetarget
with length in the range \([min, max)\).PSTILO = Path Source Target In Lexicographical Order
If incremented, the iterator will point to the next least edge labelling of a path (in lexicographical order). Iterators of the type returned by this function are equal whenever they point to equal objects.
- Return
An iterator
it
of typeconst_pstilo_iterator
pointing to a libsemigroups::word_type consisting of the edge labels of the first path (in lexicographical order) from the nodesource
to the nodetarget
with length in the range \([min, max)\) (if any).- Warning
Copying iterators of this type is expensive. As a consequence, prefix incrementing
++it
the returned iteratorit
significantly cheaper than postfix incrementingit++
.- Warning
If the action digraph represented by
this
contains a cycle that is reachable fromsource
, then there may be infinitely many paths starting atsource
, and somax
should be chosen with some care.- See
- Parameters
source
: the first nodetarget
: the last 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
: iftarget
orsource
is not a node in the digraph.