Pixie
Loading...
Searching...
No Matches
pixie::LoudsTree Class Reference

A tree class based on the level order unary degree sequence (LOUDS) representation. More...

#include <louds_tree.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 () const
 Returns the root node.
 
size_t size () const
 Returns the size of the tree.
 
bool is_leaf (const LoudsNode &node) const
 Indicates if node is a leaf.
 
bool is_root (const LoudsNode &node) const
 Indicates if node is a root.
 
size_t degree (const LoudsNode &node) const
 Returns the number of children of a node.
 
LoudsNode child (const LoudsNode &node, size_t i) const
 Returns the i-th child of node Indexing starts at 0.
 
LoudsNode first_child (const LoudsNode &node) const
 Returns first child of a node.
 
LoudsNode parent (const LoudsNode &node) const
 Returns the parent of a node if node is not root, else returns root.
 
bool is_last_child (const LoudsNode &node) const
 Indicates if node is last child.
 
LoudsNode next_sibling (const LoudsNode &node) const
 Returns next sibling of a node.
 

Detailed Description

A tree class based on the level order unary degree sequence (LOUDS) representation.


The documentation for this class was generated from the following file: