#include <dynamic_bitset.h>
Public Member Functions | |
void | clear () |
DynamicBitset () | |
DynamicBitset (size_t size) | |
bool | empty () const |
checks if the bitset is empty More... | |
void | reset () |
void | reset (size_t index) |
set one bit to 0 More... | |
void | reset_block (size_t index) |
sets a specific bit to 0, and more bits too This function is useful when resetting a given set of bits so that the whole bitset ends up being 0: if that's the case, we don't care about setting other bits to 0 More... | |
void | resize (size_t size) |
void | set (size_t index) |
size_t | size () const |
bool | test (size_t index) const |
Private Member Functions | |
template<typename Archive > | |
void | serialize (Archive &ar) |
Private Attributes | |
std::vector< size_t > | bitset_ |
size_t | size_ |
Static Private Attributes | |
static const unsigned int | cell_bit_size_ = CHAR_BIT * sizeof(size_t) |
Friends | |
struct | serialization::access |
Class re-implementing the boost version of it This helps not depending on boost, it also does not do the bound checks and has a way to reset a block for speed
Definition at line 82 of file dynamic_bitset.h.
|
inline |
default | constructor |
Definition at line 117 of file dynamic_bitset.h.
|
inline |
only | constructor we use in our code |
the | size of the bitset (in bits) |
Definition at line 124 of file dynamic_bitset.h.
|
inline |
Sets all the bits to 0
Definition at line 132 of file dynamic_bitset.h.
|
inline |
checks if the bitset is empty
Definition at line 140 of file dynamic_bitset.h.
|
inline |
set | all the bits to 0 |
Definition at line 147 of file dynamic_bitset.h.
|
inline |
|
inline |
sets a specific bit to 0, and more bits too This function is useful when resetting a given set of bits so that the whole bitset ends up being 0: if that's the case, we don't care about setting other bits to 0
Definition at line 166 of file dynamic_bitset.h.
|
inline |
resize | the bitset so that it contains at least size bits |
size |
Definition at line 174 of file dynamic_bitset.h.
|
inlineprivate |
Definition at line 206 of file dynamic_bitset.h.
|
inline |
set | a bit to true |
index | the index of the bit to set to 1 |
Definition at line 183 of file dynamic_bitset.h.
|
inline |
gives | the number of contained bits |
Definition at line 190 of file dynamic_bitset.h.
|
inline |
check | if a bit is set |
index | the index of the bit to check |
Definition at line 199 of file dynamic_bitset.h.
|
friend |
Definition at line 211 of file dynamic_bitset.h.
|
private |
Definition at line 214 of file dynamic_bitset.h.
Definition at line 216 of file dynamic_bitset.h.
|
private |
Definition at line 215 of file dynamic_bitset.h.