
Bitsets with index offset. More...
#include <bitset-offset.hpp>
Public Member Functions | |
| BitSetOffset (A &a, unsigned int s, int o) | |
| Bit set with space for s bits with offset of . More... | |
| BitSetOffset (A &a, const BitSetOffset &bs) | |
| Copy bit set bs. More... | |
| ~BitSetOffset (void) | |
| Destructor. More... | |
| bool | get (int i) const |
| Access value at bit i. More... | |
| void | set (int i) |
| Set bit i. More... | |
| void | clear (int i) |
| Clear bit i. More... | |
| int | next (int i) const |
| Return position greater or equal i of next set bit (i is allowed to be equal to size) More... | |
| void | resize (A &a, unsigned int n, int offset, bool set=false) |
| Resize bitset to n elements with specified offset. More... | |
| int | offset (void) const |
| Retrieve the minimum valid index (the offset). More... | |
| int | max_bit (void) const |
| Retrieve the maximum valid index. More... | |
| bool | valid (int i) const |
| Is the bit index valid for this bitset? More... | |
Public Member Functions inherited from Gecode::Support::BitSetBase | |
| 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 Attributes | |
| A & | a |
| Allocator. More... | |
| int | _offset |
| Offset. More... | |
Protected Attributes inherited from Gecode::Support::BitSetBase | |
| unsigned int | sz |
| Size of bitset (number of bits) More... | |
| BitSetData * | data |
| Stored bits. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from Gecode::Support::BitSetBase | |
| 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... | |
Static Protected Attributes inherited from Gecode::Support::BitSetBase | |
| static const unsigned int | bpb = BitSetData::bpb |
| Bits per base. More... | |
Bitsets with index offset.
The valid range of indices for a BitSetOffset with s bits and an offset of o is [o, o+1, ..., o+s-1].
Definition at line 55 of file bitset-offset.hpp.
|
inline |
Bit set with space for s bits with offset of .
Definition at line 94 of file bitset-offset.hpp.
|
inline |
Copy bit set bs.
Definition at line 99 of file bitset-offset.hpp.
|
inline |
Destructor.
Definition at line 104 of file bitset-offset.hpp.
|
inline |
Access value at bit i.
Definition at line 110 of file bitset-offset.hpp.
|
inline |
Set bit i.
Definition at line 114 of file bitset-offset.hpp.
|
inline |
Clear bit i.
Definition at line 118 of file bitset-offset.hpp.
|
inline |
Return position greater or equal i of next set bit (i is allowed to be equal to size)
Definition at line 122 of file bitset-offset.hpp.
| void Gecode::Support::BitSetOffset< A >::resize | ( | A & | a, |
| unsigned int | n, | ||
| int | offset, | ||
| bool | set = false |
||
| ) |
Resize bitset to n elements with specified offset.
Definition at line 126 of file bitset-offset.hpp.
|
inline |
Retrieve the minimum valid index (the offset).
Definition at line 133 of file bitset-offset.hpp.
|
inline |
Retrieve the maximum valid index.
Definition at line 137 of file bitset-offset.hpp.
|
inline |
Is the bit index valid for this bitset?
Definition at line 141 of file bitset-offset.hpp.
|
protected |
Allocator.
Definition at line 58 of file bitset-offset.hpp.
|
protected |
Offset.
Definition at line 60 of file bitset-offset.hpp.