CluE
1.0
|
Dynamic bitset similiar to boost::dynamic_bitset. More...
#include <dynamicbitset.h>
Public Member Functions | |
DynamicBitset (unsigned long long numberOfBits) | |
Constructs a bitset which maintains numberOfBits bits. More... | |
bool | operator[] (size_t position) const |
Read access to the (position+1)-th bit. More... | |
void | set (size_t position, bool value) |
Write access to the (position+1)-th bit. More... | |
unsigned long long | count () |
Number of set bits. More... | |
Private Attributes | |
const unsigned long long | numberOfBits |
const int | sizeOfT |
std::vector< T > | bitvector |
Dynamic bitset similiar to boost::dynamic_bitset.
T is the integral type maintaining a bunch of bits, i.e. sizeof(T)*8 bits.
Definition at line 15 of file dynamicbitset.h.
CluE::DynamicBitset< T >::DynamicBitset | ( | unsigned long long | numberOfBits | ) |
Constructs a bitset which maintains numberOfBits bits.
numberOfBits | The number of bits. |
Definition at line 53 of file dynamicbitset.h.
bool CluE::DynamicBitset< T >::operator[] | ( | size_t | position | ) | const |
Read access to the (position+1)-th bit.
Index | of bit (starting with 0) |
Definition at line 60 of file dynamicbitset.h.
void CluE::DynamicBitset< T >::set | ( | size_t | position, |
bool | value | ||
) |
Write access to the (position+1)-th bit.
position | Index of bit (starting with 0) |
value | Value to write |
Definition at line 67 of file dynamicbitset.h.
unsigned long long CluE::DynamicBitset< T >::count | ( | ) |
Number of set bits.
Definition at line 78 of file dynamicbitset.h.
|
private |
Definition at line 47 of file dynamicbitset.h.
|
private |
Definition at line 48 of file dynamicbitset.h.
|
private |
Definition at line 49 of file dynamicbitset.h.