ADS
Algorithms and Data Structures
Loading...
Searching...
No Matches

The vectors of bits and of fields of ADS to and from those of sdsl-lite (its version 3, https://github.com/xxsds/sdsl-lite, header-only and under the BSD license), so that a structure of either library is built on the data of the other. More...

Files

file  ADS/interop/sdsl/Sdsl.h
 The vectors of bits and of fields of ADS to and from those of sdsl-lite (its version 3, https://github.com/xxsds/sdsl-lite, header-only and under the BSD license), so that a structure of either library is built on the data of the other: an FM-index, a wavelet tree or a compressed suffix array of sdsl over a BitVector or a PackedArray of ADS, a RankSelect, an EliasFano or a WaveletMatrix of ADS over a bit_vector or an int_vector of sdsl.

Functions

sdsl::bit_vector ADS::toSdsl (const BitVector &b)
 the bits of \( b \) as a bit_vector of sdsl-lite, by a copy of the words
BitVector ADS::toBitVector (const sdsl::bit_vector &v)
 the bits of the bit_vector \( v \) of sdsl-lite as a BitVector, by a copy of the words
template<unsigned B, bool S>
sdsl::int_vector< B > ADS::toSdsl (const PackedArray< B, S > &a)
 the fields of \( a \) as an int_vector< B > of sdsl-lite, by a copy of the words
template<unsigned B, bool S = false, std::uint8_t W>
PackedArray< B, S > ADS::toPackedArray (const sdsl::int_vector< W > &v)
 the fields of the int_vector \( v \) of sdsl-lite as a PackedArray< B , S >: by a copy of the words if its width is \( B \), and else field by field, each clamped to \( 2^B - 1 \) if \( S \)

Detailed description

The vectors of bits and of fields of ADS to and from those of sdsl-lite (its version 3, https://github.com/xxsds/sdsl-lite, header-only and under the BSD license), so that a structure of either library is built on the data of the other.

Function documentation

◆ toBitVector()

BitVector ADS::toBitVector ( const sdsl::bit_vector & v)
inlinenodiscard

the bits of the bit_vector \( v \) of sdsl-lite as a BitVector, by a copy of the words

◆ toPackedArray()

template<unsigned B, bool S = false, std::uint8_t W>
PackedArray< B, S > ADS::toPackedArray ( const sdsl::int_vector< W > & v)
nodiscard

the fields of the int_vector \( v \) of sdsl-lite as a PackedArray< B , S >: by a copy of the words if its width is \( B \), and else field by field, each clamped to \( 2^B - 1 \) if \( S \)

Exceptions
std::invalid_argumentif \( v \) has a field of more than \( B \) bits and not \( S \)

◆ toSdsl() [1/2]

sdsl::bit_vector ADS::toSdsl ( const BitVector & b)
inlinenodiscard

the bits of \( b \) as a bit_vector of sdsl-lite, by a copy of the words

◆ toSdsl() [2/2]

template<unsigned B, bool S>
sdsl::int_vector< B > ADS::toSdsl ( const PackedArray< B, S > & a)
nodiscard

the fields of \( a \) as an int_vector< B > of sdsl-lite, by a copy of the words