Simple bitsets. More...
#include <bitset.hpp>
Public Member Functions | |
BitSet (A &a, unsigned int s) | |
Bit set with space for s bits. | |
BitSet (A &a, const BitSet &bs) | |
Copy bit set bs. | |
~BitSet (void) | |
Destructor. | |
![]() | |
BitSetBase (void) | |
Default constructor (yields empty set) | |
template<class A > | |
BitSetBase (A &a, unsigned int s, bool set=false) | |
Initialize for s bits and allocator a. | |
template<class A > | |
BitSetBase (A &a, const BitSetBase &bs) | |
Copy from bitset bs with allocator a. | |
template<class A > | |
void | init (A &a, unsigned int s, bool set=false) |
Initialize for s bits and allocator a (only after default constructor) | |
unsigned int | size (void) const |
Return size of bitset (number of bits) | |
bool | get (unsigned int i) const |
Access value at bit i. | |
void | set (unsigned int i) |
Set bit i. | |
void | clear (unsigned int i) |
Clear bit i. | |
unsigned int | next (unsigned int i) const |
Return position greater or equal i of next set bit (i is allowed to be equal to size) | |
BitSetStatus | status (void) const |
Return status of bitset. | |
template<class A > | |
void | resize (A &a, unsigned int n, bool set=false) |
Resize bitset to n elememts. | |
template<class A > | |
void | dispose (A &a) |
Dispose memory for bit set. |
Protected Attributes | |
A & | a |
Allocator. | |
![]() | |
unsigned int | sz |
Size of bitset (number of bits) | |
BitSetData * | data |
Stored bits. |
Additional Inherited Members | |
![]() | |
bool | _get (unsigned int i) const |
Access value at bit i (no index check) | |
void | _set (unsigned int i) |
Set bit i (no index check) | |
![]() | |
static const unsigned int | bpb = BitSetData::bpb |
Bits per base. |
Simple bitsets.
Definition at line 49 of file bitset.hpp.
|
inline |
Bit set with space for s bits.
Definition at line 64 of file bitset.hpp.
|
inline |
Copy bit set bs.
Definition at line 69 of file bitset.hpp.
|
inline |
Destructor.
Definition at line 74 of file bitset.hpp.
|
protected |
Allocator.
Definition at line 52 of file bitset.hpp.