Accessors¶
-
inline label_type libsemigroups::Forest::label(node_type i) const¶
Returns the label of the edge from a node to its parent.
- Complexity
Constant
- Parameters
i – the node whose label is sought.
- Throws
LibsemigroupsException – if
i
exceedsnumber_of_nodes()
.- Returns
A label_type.
-
inline size_t libsemigroups::Forest::number_of_nodes() const noexcept¶
Returns the number of nodes in the forest.
- Complexity
Constant
- Parameters
(None)
- Throws
(None) – This function is
noexcept
and is guaranteed never to throw.- Returns
A
size_t
.
-
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
exceedsnumber_of_nodes()
.- Returns
A node_type.