parent

inline node_type libsemigroups::Forest::parent(node_type i) const

Returns the parent of a node.

Complexity

Constant

Parameters

i – the node whose parent is sought.

Throws

LibsemigroupsException – if i exceeds nr_nodes().

Returns

A Forest::node_type.