number_of_paths_algorithm(node_type const, node_type const, size_t const, size_t const) const

inline 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)\).

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 node

  • target – the target node

  • min – the minimum length of paths to count

  • max – the maximum length of paths to count

Returns

A value of type ActionDigraph::algorithm.