95 using Edge = std::pair< std::size_t , std::size_t >;
134 K2Tree( std::size_t n ,
const std::vector< Edge > & e , std::size_t k = 2 );
137 [[nodiscard]] std::size_t
order(
void )
const;
140 [[nodiscard]] std::size_t
edges(
void )
const;
167 [[nodiscard]] std::vector< std::size_t >
neighbors( std::size_t u )
const;
173 [[nodiscard]] std::vector< std::size_t >
195 [[nodiscard]]
bool hasEdge( std::size_t u , std::size_t v )
const;
219 [[nodiscard]]
bool mark( std::size_t p )
const;
223 [[nodiscard]] std::size_t children( std::size_t p )
const;
228 void walk( std::size_t s , std::size_t r , std::size_t o , std::size_t base ,
229 bool row , std::vector< std::size_t > & out )
const;
233 std::size_t f_side = 1;
248#include "ADS/succinct/impl/K2Tree.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
K2Tree(std::size_t n, const std::vector< Edge > &e, std::size_t k=2)
the graph of nodes and the edges (repeated ones counted once)
void persist(A &a)
the members written to, or read from, the archive [see Persistence.h]
std::size_t sizeInBits(void) const
the bits of , and the rank directory of
std::size_t edges(void) const
the number of distinct edges
const BitVector & leaves(void) const
, the marks of the cells
std::pair< std::size_t, std::size_t > Edge
an edge , from to
Definition K2Tree.h:95
std::size_t order(void) const
the number of nodes,
static constexpr std::string_view persistName
the name of the structure in a file [see Persistence.h]
Definition K2Tree.h:209
std::vector< std::size_t > reverseNeighbors(std::size_t v) const
the predecessors of , in increasing order: the walk of neighbors() on the children that cross the col...
std::vector< std::size_t > neighbors(std::size_t u) const
the successors of , in increasing order
const BitVector & levels(void) const
, the marks of the levels but the last
K2Tree(void)=default
the graph with no node
bool hasEdge(std::size_t u, std::size_t v) const
whether is an edge
BasicRankSelect< false > RankSelect
the directory with its inventories of select built in the constructor, the fastest select
Definition RankSelect.h:556