113 using List = std::vector< std::size_t >;
116 using Interval = std::pair< std::size_t , std::size_t >;
162 explicit BVGraph(
const std::vector< List > & a , std::size_t w = 7 ,
163 std::size_t r = 3 , std::size_t lmin = 4 );
166 [[nodiscard]] std::size_t
order(
void )
const;
169 [[nodiscard]] std::size_t
edges(
void )
const;
173 [[nodiscard]] std::size_t
outdegree( std::size_t x )
const;
206 [[nodiscard]] std::size_t
reference( std::size_t x )
const;
236 [[nodiscard]]
static std::pair< bool , std::vector< std::size_t > >
258 [[nodiscard]]
static std::pair< std::vector< Interval > ,
List >
264 [[nodiscard]]
static std::vector< std::uint64_t >
281 [[nodiscard]]
List decode( std::size_t x )
const;
285 std::size_t f_lmin = 4;
299#include "ADS/succinct/impl/BVGraph.tpp"
The streams of bits on which the integer codes are written and read [see IntegerCodes....
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,...
The Elias-Fano representation of a non-decreasing sequence of integers in (chapters 11,...
The codes of the integers of chapter 11, Integer Coding, of Ferragina's book: self-delimiting binary ...
std::pair< std::size_t, std::size_t > Interval
an interval of extra nodes, its left extreme and its length
Definition BVGraph.h:116
std::size_t sizeInBits(void) const
the bits of the lists and of their places
static std::pair< bool, std::vector< std::size_t > > copyBlocks(const BitVector &c)
the copy blocks of the copy list : its first bit and the lengths less 1 of its runs but the last
static std::pair< std::vector< Interval >, List > intervals(const List &e, std::size_t lmin)
the runs of at least consecutive integers of the strictly increasing , and the residuals
std::size_t edges(void) const
the number of edges,
static BitVector copyList(const List &s, const List &ref)
the copy list of against the reference list ref: a bit per item of ref, 1 if it is in (found by a b...
static std::vector< std::uint64_t > residualGaps(const List &res, std::size_t x)
the residuals res of as written: the first as signedToNatural() of its difference from ,...
std::vector< std::size_t > List
an adjacency list, strictly increasing
Definition BVGraph.h:113
std::size_t order(void) const
the number of nodes,
BVGraph(void)=default
the graph with no node
void persist(A &a)
the members written to, or read from, the archive [see Persistence.h]
BVGraph(const std::vector< List > &a, std::size_t w=7, std::size_t r=3, std::size_t lmin=4)
the graph of the adjacency lists , with the window , chains of references at most long and intervals...
std::size_t outdegree(std::size_t x) const
the number of successors of , the first code of its list
static constexpr std::string_view persistName
the name of the structure in a file [see Persistence.h]
Definition BVGraph.h:270
List successors(std::size_t x) const
the successors of , in increasing order
std::size_t reference(std::size_t x) const
the reference of , 0 for none
std::size_t codeBits(void) const
the bits of the lists
a vector of bits packed in words of 64 bits
Definition BitVector.h:479
BasicEliasFano< false > EliasFano
Elias-Fano with the inventories of built in the constructor, the fastest access() and nextGEQ().
Definition EliasFano.h:291