scc_id

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

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

Complexity

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

Parameters

nd – the node.

Throws

LibsemigroupsException – if nd is not valid.

Returns

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