
Basic bitset support. More...
#include <bitset-base.hpp>
Public Member Functions | |
| BitSetBase (void) | |
| Default constructor (yields empty set) More... | |
| template<class A > | |
| BitSetBase (A &a, unsigned int s, bool set=false) | |
| Initialize for s bits and allocator a. More... | |
| template<class A > | |
| BitSetBase (A &a, const BitSetBase &bs) | |
| Copy from bitset bs with allocator a. More... | |
| template<class A > | |
| void | init (A &a, unsigned int s, bool set=false) |
| Initialize for s bits and allocator a (only after default constructor) More... | |
| unsigned int | size (void) const |
| Return size of bitset (number of bits) More... | |
| bool | get (unsigned int i) const |
| Access value at bit i. More... | |
| void | set (unsigned int i) |
| Set bit i. More... | |
| void | clear (unsigned int i) |
| Clear bit i. More... | |
| 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) More... | |
| BitSetStatus | status (void) const |
| Return status of bitset. More... | |
| template<class A > | |
| void | resize (A &a, unsigned int n, bool set=false) |
| Resize bitset to n elememts. More... | |
| template<class A > | |
| void | dispose (A &a) |
| Dispose memory for bit set. More... | |
Protected Member Functions | |
| bool | _get (unsigned int i) const |
| Access value at bit i (no index check) More... | |
| void | _set (unsigned int i) |
| Set bit i (no index check) More... | |
Protected Attributes | |
| unsigned int | sz |
| Size of bitset (number of bits) More... | |
| BitSetData * | data |
| Stored bits. More... | |
Static Protected Attributes | |
| static const unsigned int | bpb = BitSetData::bpb |
| Bits per base. More... | |
Basic bitset support.
Definition at line 113 of file bitset-base.hpp.
|
inline |
Default constructor (yields empty set)
Definition at line 277 of file bitset-base.hpp.
|
inline |
Initialize for s bits and allocator a.
Definition at line 282 of file bitset-base.hpp.
|
inline |
Copy from bitset bs with allocator a.
Definition at line 293 of file bitset-base.hpp.
|
inlineprotected |
Access value at bit i (no index check)
Definition at line 243 of file bitset-base.hpp.
|
inlineprotected |
Set bit i (no index check)
Definition at line 247 of file bitset-base.hpp.
|
inline |
Initialize for s bits and allocator a (only after default constructor)
Definition at line 304 of file bitset-base.hpp.
|
inline |
Return size of bitset (number of bits)
Definition at line 314 of file bitset-base.hpp.
|
inline |
Access value at bit i.
Definition at line 319 of file bitset-base.hpp.
|
inline |
Set bit i.
Definition at line 324 of file bitset-base.hpp.
|
inline |
Clear bit i.
Definition at line 329 of file bitset-base.hpp.
|
inline |
Return position greater or equal i of next set bit (i is allowed to be equal to size)
Definition at line 335 of file bitset-base.hpp.
|
inline |
Return status of bitset.
Definition at line 349 of file bitset-base.hpp.
| void Gecode::Support::BitSetBase::resize | ( | A & | a, |
| unsigned int | n, | ||
| bool | set = false |
||
| ) |
Resize bitset to n elememts.
Definition at line 253 of file bitset-base.hpp.
|
inline |
Dispose memory for bit set.
Definition at line 272 of file bitset-base.hpp.
|
staticprotected |
Bits per base.
Definition at line 116 of file bitset-base.hpp.
|
protected |
Size of bitset (number of bits)
Definition at line 118 of file bitset-base.hpp.
|
protected |
Stored bits.
Definition at line 120 of file bitset-base.hpp.