Forest¶
This page contains the documentation for the class Forest
.
|
Overloaded function. |
|
Add nodes to the Forest. |
|
Removes all nodes from the forest. |
|
Returns the label of the edge from a node to its parent. |
|
Returns the number of nodes in the forest. |
|
Returns the parent of a node. |
|
Returns an iterator pointing to the parent of the first node. |
|
Set the parent and edge label for a node. |
- class Forest(*args, **kwargs)¶
Overloaded function.
__init__(self: _libsemigroups_pybind11.Forest, arg0: int) -> None
__init__(self: _libsemigroups_pybind11.Forest, that: _libsemigroups_pybind11.Forest) -> None
- add_nodes(self: _libsemigroups_pybind11.Forest, n: int) None ¶
Add nodes to the Forest.
- Parameters
n (in) -- the number of nodes to add.
- Returns
(None)
- clear(self: _libsemigroups_pybind11.Forest) None ¶
Removes all nodes from the forest.
- Returns
(None)
- label(self: _libsemigroups_pybind11.Forest, i: int) int ¶
Returns the label of the edge from a node to its parent.
- Parameters
i (int) -- the node whose label is sought.
- Returns
A
int
.
- number_of_nodes(self: _libsemigroups_pybind11.Forest) int ¶
Returns the number of nodes in the forest.
- Returns
An
int
.
- parent(self: _libsemigroups_pybind11.Forest, i: int) int ¶
Returns the parent of a node.
- Parameters
i (int) -- the node whose parent is sought.
- Returns
An
int
.
- parent_iterator(self: _libsemigroups_pybind11.Forest) Iterator ¶
Returns an iterator pointing to the parent of the first node.
- Parameters
None.
- Returns
An iterator.