number_of_paths(node_type const) const

uint64_t libsemigroups::ActionDigraph::number_of_paths(node_type const source) const

Returns the number of paths originating at the given source node.

Return

A value of type uint64_t.

Complexity

At worst \(O(nm)\) where \(n\) is the number of nodes and \(m\) is the out-degree of the digraph.

Warning

If the number of paths exceeds 2 ^ 64, then return value of this function will not be correct.

Parameters
  • source: the source node.

Exceptions