Elm
2
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
|
#include <elm/util/WAHVector.h>
Classes | |
class | Bit |
Public Types | |
typedef t::uint32 | word_t |
WAHVector is an implementation of bit vector (like elm::BitVector) whose tradeoff has been moved towards a more compact internal representation. Algorithms of WAHVector are a C++ adaptation of:
Wu, K., Otoo, E. J., & Shoshani, A. (2002). Compressing bitmap indexes for faster search operations. Proceedings. 14th International Conference on Scientific and Statistical Database Management (pp. 99-108), IEEE, 2002.
Referenced by WAHVector::__size().
Build a bit of the given size bits.
size | Size in bits of the vector. |
init | Initial value. |
References elm::div(), elm::fill(), and WAHVector::size().
Build a WAHVector by cloning the given one.
v | Vector to clone. |
References elm::array::copy().
void __dump | ( | io::Output & | out | ) | const |
References elm::io::hex(), and iter::next().
Referenced by elm::operator<<().
|
inline |
References WAHVector::WAHVector().
Referenced by WAHVector::operator&=(), and WAHVector::operator*=().
Referenced by WAHVector::operator+=(), and WAHVector::operator|=().
Referenced by WAHVector::operator-=().
bool bit | ( | int | index | ) | const |
Test if a bit has for value one.
index | Index of the tested bit. |
References elm::mod().
Referenced by WAHVector::Bit::operator bool(), and WAHVector::operator[]().
void clear | ( | int | index | ) |
Clear a bit.
index | Index of the bit. |
References elm::div(), elm::fill(), builder::fix(), elm::lite(), elm::mod(), builder::pushLite(), and builder::pushRaw().
Copy the given vector into the current one.
v | Vector to copy. |
References elm::array::copy().
Referenced by WAHVector::operator=().
|
inline |
Same as countBits().
References WAHVector::countOnes().
int countOnes | ( | void | ) | const |
Count the number of bits to 1.
References elm::mask(), elm::ones(), and elm::times().
Referenced by WAHVector::countBits(), and WAHVector::countZeroes().
|
inline |
References WAHVector::countOnes(), and WAHVector::size().
Test if both vectors are equal.
v | Vector to compare with. |
Referenced by WAHVector::includesStrictly(), WAHVector::operator!=(), and WAHVector::operator==().
Test if the current vector includes the given one.
vec | Vector to include. |
References iter::consume(), iter::count(), iter::isFill(), elm::min(), and iter::value().
Referenced by WAHVector::includesStrictly(), WAHVector::operator<=(), and WAHVector::operator>=().
Test if the current vector includes strictly the given one.
vec | Vector to include. |
References WAHVector::equals(), and WAHVector::includes().
Referenced by WAHVector::operator<(), and WAHVector::operator>().
Referenced by WAHVector::operator&(), and WAHVector::operator*().
Referenced by WAHVector::operator~().
Referenced by WAHVector::operator+(), and WAHVector::operator|().
Referenced by WAHVector::operator-().
References WAHVector::equals().
References WAHVector::makeAnd().
References WAHVector::applyAnd().
References WAHVector::makeAnd().
References WAHVector::applyAnd().
References WAHVector::makeOr().
References WAHVector::applyOr().
References WAHVector::makeReset().
References WAHVector::applyReset().
References WAHVector::includesStrictly().
References WAHVector::includes().
References WAHVector::copy().
References WAHVector::equals().
References WAHVector::includesStrictly().
References WAHVector::includes().
|
inline |
|
inline |
References WAHVector::bit().
References WAHVector::makeOr().
References WAHVector::applyOr().
References WAHVector::makeNot().
void set | ( | int | index | ) |
int WAHVector::countZeroes(void) const; Count the number of zeroes in the bit vector.
index | Index of the bit. |
References elm::div(), elm::fill(), builder::fix(), elm::lite(), elm::mod(), builder::pushLite(), and builder::pushRaw().
References WAHVector::clear(), and WAHVector::set().
Referenced by WAHVector::Bit::operator=(), and WAHVector::set().
Set all vector bits to 1.
References elm::div(), and elm::fill().
int size | ( | void | ) | const |
Compute the number of bits in the vector.
References elm::times().
Referenced by WAHVector::countZeroes(), and WAHVector::WAHVector().