scc_id

scc_index_type libsemigroups::ActionDigraph::scc_id(node_type nd) const

Returns the id-number of the strongly connected component of a node.

Return

The index of the node nd, a value of type scc_index_type.

Complexity

At most \(O(mn)\) where m is nr_nodes() and n is out_degree().

Parameters
  • nd: the node.

Exceptions