56#ifndef __ADS_JacobsonTree
57 #define __ADS_JacobsonTree
90 static constexpr std::size_t
nil = std::size_t( -1 );
117 const std::vector< std::pair< std::size_t , std::size_t > > & c );
124 [[nodiscard]] std::size_t
size(
void )
const;
127 [[nodiscard]] std::size_t
root(
void )
const;
142 [[nodiscard]] std::size_t
left( std::size_t v )
const;
147 [[nodiscard]] std::size_t
right( std::size_t v )
const;
163 [[nodiscard]] std::size_t
parent( std::size_t v )
const;
167 [[nodiscard]]
bool isLeaf( std::size_t v )
const;
185 [[nodiscard]] std::size_t nodeAt( std::size_t q )
const;
189 [[nodiscard]]
bool valid(
void )
const;
203#include "ADS/succinct/impl/JacobsonTree.tpp"
The vector of bits on which the succinct structures and the integer codes of ADS are built: the bits ...
The contracts of ADS: the preconditions, the postconditions and the invariants of the operations,...
Rank and select on a static vector of bits of bits with 1s (chapter 15, Compressed Data Structures...
a vector of bits packed in words of 64 bits
Definition BitVector.h:479
std::size_t size(void) const
the number of nodes
static constexpr std::string_view persistName
the name of the structure in a file [see Persistence.h]
Definition JacobsonTree.h:175
static constexpr std::size_t nil
no node
Definition JacobsonTree.h:90
std::size_t parent(std::size_t v) const
the parent of , nil for the root
JacobsonTree(BitVector b)
the tree whose code by levels is
bool isLeaf(std::size_t v) const
whether has no children
std::size_t root(void) const
the root, nil if the tree is empty
const BitVector & bits(void) const
, the code by levels
JacobsonTree(void)
the empty tree
JacobsonTree(const std::vector< std::pair< std::size_t, std::size_t > > &c)
the tree whose node has the children c[ u ].first (left) and c[ u ].second (right),...
std::size_t right(std::size_t v) const
the right child of , nil if missing: left() with the place
void persist(A &a)
the members written to, or read from, the archive [see Persistence.h]
std::size_t left(std::size_t v) const
the left child of , nil if missing: the node at the place of , counted from 0
BasicRankSelect< false > RankSelect
the directory with its inventories of select built in the constructor, the fastest select
Definition RankSelect.h:556