
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 setbits=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 setbits=false) |
| Initialize for s bits and allocator a (only after default constructor) More... | |
| void | clearall (bool setbits=false) |
| Clear sz bits. More... | |
| void | copy (const BitSetBase &bs) |
| Copy sz bits from bs. 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... | |
| bool | all (void) const |
| Test whether all bits are set. More... | |
| bool | none (void) const |
| Test whether no bits are set. More... | |
| template<class A > | |
| void | resize (A &a, unsigned int n, bool setbits=false) |
| Resize bitset to n elememts. More... | |
| template<class A > | |
| void | dispose (A &a) |
| Dispose memory for bit set. More... | |
Public Member Functions inherited from Gecode::Support::RawBitSetBase | |
| RawBitSetBase (void) | |
| Default constructor (yields empty set) More... | |
| template<class A > | |
| RawBitSetBase (A &a, unsigned int sz, bool setbits=false) | |
| Initialize for sz bits and allocator a. More... | |
| template<class A > | |
| RawBitSetBase (A &a, unsigned int sz, const RawBitSetBase &bs) | |
| Copy from bitset bs with allocator a. More... | |
| template<class A > | |
| void | allocate (A &a, unsigned int sz) |
| Allocate for sz bits and allocator a (only after default constructor) More... | |
| template<class A > | |
| void | init (A &a, unsigned int sz, bool setbits=false) |
| Initialize for sz bits and allocator a (only after default constructor) More... | |
| void | clearall (unsigned int sz, bool setbits=false) |
| Clear sz bits. More... | |
| void | copy (unsigned int sz, const RawBitSetBase &bs) |
| Copy sz bits from bs. 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 (unsigned int sz) const |
| Return status of bitset. More... | |
| bool | all (unsigned int sz) const |
| Test whether all bits are set. More... | |
| bool | none (unsigned int sz) const |
| Test whether no bits are set. More... | |
| template<class A > | |
| void | resize (A &a, unsigned int sz, unsigned int n, bool setbits=false) |
| Resize bitset from sz to n elememts. More... | |
| template<class A > | |
| void | dispose (A &a, unsigned int sz) |
| Dispose memory for bit set. More... | |
Protected Attributes | |
| unsigned int | sz |
| Size of bitset (number of bits) More... | |
Protected Attributes inherited from Gecode::Support::RawBitSetBase | |
| BitSetData * | data |
| Stored bits. More... | |
Additional Inherited Members | |
Static Protected Attributes inherited from Gecode::Support::RawBitSetBase | |
| static const unsigned int | bpb = BitSetData::bpb |
| Bits per base. More... | |
Basic bitset support.
Definition at line 178 of file bitset-base.hpp.
|
inline |
Default constructor (yields empty set)
Definition at line 493 of file bitset-base.hpp.
|
inline |
Initialize for s bits and allocator a.
Definition at line 498 of file bitset-base.hpp.
|
inline |
Copy from bitset bs with allocator a.
Definition at line 503 of file bitset-base.hpp.
|
inline |
Initialize for s bits and allocator a (only after default constructor)
Definition at line 508 of file bitset-base.hpp.
|
inline |
Clear sz bits.
Definition at line 520 of file bitset-base.hpp.
|
inline |
Copy sz bits from bs.
Definition at line 514 of file bitset-base.hpp.
|
inline |
Return size of bitset (number of bits)
Definition at line 525 of file bitset-base.hpp.
|
inline |
Access value at bit i.
Definition at line 530 of file bitset-base.hpp.
|
inline |
Set bit i.
Definition at line 535 of file bitset-base.hpp.
|
inline |
Clear bit i.
Definition at line 540 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 546 of file bitset-base.hpp.
|
inline |
Return status of bitset.
Definition at line 552 of file bitset-base.hpp.
|
inline |
Test whether all bits are set.
Definition at line 557 of file bitset-base.hpp.
|
inline |
Test whether no bits are set.
Definition at line 562 of file bitset-base.hpp.
| void Gecode::Support::BitSetBase::resize | ( | A & | a, |
| unsigned int | n, | ||
| bool | setbits = false |
||
| ) |
Resize bitset to n elememts.
Definition at line 482 of file bitset-base.hpp.
|
inline |
Dispose memory for bit set.
Definition at line 488 of file bitset-base.hpp.
|
protected |
Size of bitset (number of bits)
Definition at line 181 of file bitset-base.hpp.