A tree class based on the depth-first unary degree sequence (DFUDS) representation.
More...
#include <dfuds_tree.h>
|
| | DFUDSTree (const std::vector< std::uint64_t > &dfuds_sequence, size_t tree_size) |
| | Constructor from an external array of uint64_t.
|
| |
|
size_t | size () const |
| | Returns the size of the tree.
|
| |
|
bool | is_leaf (const Node &node) const |
| | Indicates if node is a leaf.
|
| |
|
bool | is_root (const Node &node) const |
| | Indicates if node is a root.
|
| |
|
size_t | degree (const Node &node) const |
| | Returns the number of children of a node.
|
| |
|
Node | first_child (const Node &node) |
| | Returns first child of a node.
|
| |
|
Node | child (const Node &node, size_t i) const |
| | Returns the i-th child of node Indexing starts at 0.
|
| |
|
Node | next_sibling (const Node &node) const |
| | Returns next sibling of a node.
|
| |
|
Node | parent (const Node &node) const |
| | Returns the parent of a node if node is not root, else returns root.
|
| |
|
bool | is_last_child (const Node &node) const |
| | Indicates if node is last child.
|
| |
|
|
static Node | root () |
| | Returns the root node.
|
| |
A tree class based on the depth-first unary degree sequence (DFUDS) representation.
◆ DFUDSTree()
| pixie::DFUDSTree::DFUDSTree |
( |
const std::vector< std::uint64_t > & | dfuds_sequence, |
|
|
size_t | tree_size ) |
|
inlineexplicit |
Constructor from an external array of uint64_t.
- Parameters
-
| dfuds_sequence | parenthesis sequence in dfuds representation |
The documentation for this class was generated from the following file: