|
|
| AdjListTree (const std::vector< std::vector< size_t > > &adjacency_list) |
| | Constructor from adjacency list (root is 0)
|
| |
|
AdjListNode | root () const |
| | Returns the root node.
|
| |
|
bool | is_leaf (const AdjListNode &node) const |
| | Checks if node is a leaf.
|
| |
|
bool | is_root (const AdjListNode &node) const |
| | Checks if node is a root.
|
| |
|
size_t | degree (const AdjListNode &node) const |
| | Returns the number of children of node.
|
| |
|
AdjListNode | child (const AdjListNode &node, size_t i) const |
| | Returns the i-th child of node Indexing starts at 0.
|
| |
|
AdjListNode | first_child (const AdjListNode &node) const |
| | Returns the first child of node.
|
| |
|
AdjListNode | parent (const AdjListNode &node) const |
| | Returns the parent of a node if node is not root, else returns root.
|
| |
|
bool | is_last_child (const AdjListNode &node) const |
| | Indicates if node is last child.
|
| |
|
AdjListNode | next_sibling (const AdjListNode &node) const |
| | Returns next sibling of a node.
|
| |
The documentation for this class was generated from the following file: