number_of_paths(node_type const) const

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

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

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.

Throws

LibsemigroupsException – if source is not a node in the digraph.

Returns

A value of type uint64_t.