tudocomp
– The TU Dortmund Compression Framework
|
Implements a select data structure for a BitVector. More...
#include <Select.hpp>
Public Member Functions | |
Select () | |
Default constructor. More... | |
Select (const Select &other) | |
Copy constructor. More... | |
Select (Select &&other) | |
Move constructor. More... | |
Select & | operator= (const Select &other) |
Copy assignment. More... | |
Select & | operator= (Select &&other) |
Move assignment. More... | |
Select (BitVector &bv) | |
Constructs the select data structure for the given bit vector. More... | |
size_t | select (size_t x) const |
Finds the position of the x-th flagged bit in the bit vector. More... | |
size_t | operator() (size_t k) const |
Implements a select data structure for a BitVector.
The data structure follows a block / superblock principle, where superblocks always contain s
flagged bits and blocks contain s'
flagged bits (flagged bits meaning 1 for select1 and 0 for select0).
The size of a block is logarithmic in the bit vector's length, the size of a superblock is the squared block size.
m_bit | the bits to flag (0 or 1) |
Definition at line 20 of file Select.hpp.
|
inline |
Default constructor.
Definition at line 45 of file Select.hpp.
|
inline |
Copy constructor.
Definition at line 53 of file Select.hpp.
|
inline |
Move constructor.
Definition at line 63 of file Select.hpp.
|
inline |
Constructs the select data structure for the given bit vector.
Note that changes to the bit vector after construction of this data structure will cause the select operation to not work correctly anymore. In other words, this data structure is static.
bv | the underlying bit vector |
Definition at line 101 of file Select.hpp.
|
inline |
Definition at line 246 of file Select.hpp.
|
inline |
Copy assignment.
Definition at line 73 of file Select.hpp.
|
inline |
Move assignment.
Definition at line 84 of file Select.hpp.
|
inline |
Finds the position of the x-th flagged bit in the bit vector.
x | the order of the flagged bit to find |
Definition at line 191 of file Select.hpp.