number_of_paths_algorithm(node_type const, node_type const, size_t const, size_t const) const¶
-
algorithm
libsemigroups::ActionDigraph
::
number_of_paths_algorithm
(node_type const source, node_type const target, size_t const min, size_t const max) const¶ Returns the algorithm used by
number_of_paths
to compute the number of paths originating at the given source node and ending at the given target node with length in the range \([min, max)\).- Return
A value of type ActionDigraph::algorithm.
- Exceptions
This function guarantees not to throw a LibsemigroupsException.
- Complexity
At worst \(O(nm)\) where \(n\) is the number of nodes and \(m\) is the out-degree of the digraph.
- Parameters
source
: the source nodetarget
: the target nodemin
: the minimum length of paths to countmax
: the maximum length of paths to count