![]() |
Pixie
|
A tree class based on the level order unary degree sequence (LOUDS) representation. More...
#include <louds.h>
Public Member Functions | |
| LoudsTree (std::span< const uint64_t > louds, size_t tree_size) | |
| Constructor from an external array of uint64_t. | |
| LoudsNode | root_impl () const |
| Returns the root node. | |
| size_t | size_impl () const |
| Returns the size of the tree. | |
| bool | is_leaf_impl (const LoudsNode &node) const |
Indicates if node is a leaf. | |
| bool | is_root_impl (const LoudsNode &node) const |
Indicates if node is a root. | |
| size_t | degree_impl (const LoudsNode &node) const |
Returns the number of children of a node. | |
| LoudsNode | child_impl (const LoudsNode &node, size_t i) const |
Returns the i-th child of node Indexing starts at 0. | |
| LoudsNode | first_child_impl (const LoudsNode &node) const |
Returns first child of a node. | |
| LoudsNode | parent_impl (const LoudsNode &node) const |
Returns the parent of a node if node is not root, else returns root. | |
| bool | is_last_child_impl (const LoudsNode &node) const |
Indicates if node is last child. | |
| LoudsNode | next_sibling_impl (const LoudsNode &node) const |
Returns next sibling of a node. | |
Public Member Functions inherited from pixie::TreeBase< LoudsTree > | |
| Node | root () const |
| Return the root node. | |
| std::size_t | size () const |
| Return the number of nodes. | |
| bool | empty () const |
| Check whether the tree contains no nodes. | |
| bool | is_leaf (const Node &node) const |
Check whether node has no children. | |
| bool | is_root (const Node &node) const |
Check whether node is the root. | |
| std::size_t | degree (const Node &node) const |
Return the number of children of node. | |
| Node | first_child (const Node &node) const |
Return the first child of node. | |
| Node | child (const Node &node, std::size_t index) const |
Return a child of node by zero-based index. | |
| Node | parent (const Node &node) const |
Return the parent of node. | |
| bool | is_last_child (const Node &node) const |
Check whether node is its parent's last child. | |
| Node | next_sibling (const Node &node) const |
Return the next sibling of node. | |
Additional Inherited Members | |
Public Types inherited from pixie::TreeBase< LoudsTree > | |
| using | Node |
A tree class based on the level order unary degree sequence (LOUDS) representation.