Date item for bitsets.
More...
#include <bitset-base.hpp>
|
void | init (bool setbits=false) |
| Initialize with all bits set if setbits.
|
bool | operator() (unsigned int i=0U) const |
| Test wether any bit with position greater or equal to i is set.
|
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=0U) const |
| Return next set bit with position greater or equal to i (there must be a bit)
|
bool | all (void) const |
| Whether all bits are set.
|
bool | all (unsigned int i) const |
| Whether all bits from bit 0 to bit i are set.
|
bool | none (void) const |
| Whether no bits are set.
|
bool | none (unsigned int i) const |
| Whether no bits from bit 0 to bit i are set.
|
unsigned int | ones (void) const |
| Return the number of bits set.
|
unsigned int | zeroes (void) const |
| Return the number of bits not set.
|
bool | one (void) const |
| Check whether exactly one bit is set.
|
void | a (BitSetData a) |
| Perform "and" with a.
|
void | a (BitSetData a, unsigned int i) |
| Perform "and" with a for bits 0 to i.
|
void | o (BitSetData a) |
| Perform "or" with a.
|
void | o (BitSetData a, unsigned int i) |
| Perform "or" with a for bits 0 to i.
|
bool | operator== (BitSetData a) const |
| Check if bits are the same as for a.
|
bool | operator!= (BitSetData a) const |
| Check if bits are not the same as for a.
|
BitSetData | operator~ (void) const |
| Invert all bits in b.
|
|
static const unsigned int | bpb |
| Bits per base.
|
|
typedef unsigned long long int | Base |
| Basetype for bits.
|
Date item for bitsets.
Definition at line 65 of file bitset-base.hpp.
◆ Base
◆ init()
void Gecode::Support::BitSetData::init |
( |
bool | setbits = false | ) |
|
|
inline |
◆ data()
unsigned int Gecode::Support::BitSetData::data |
( |
unsigned int | s | ) |
|
|
inlinestatic |
◆ operator()()
bool Gecode::Support::BitSetData::operator() |
( |
unsigned int | i = 0U | ) |
const |
|
inline |
Test wether any bit with position greater or equal to i is set.
Definition at line 254 of file bitset-base.hpp.
◆ get()
bool Gecode::Support::BitSetData::get |
( |
unsigned int | i | ) |
const |
|
inline |
◆ set()
void Gecode::Support::BitSetData::set |
( |
unsigned int | i | ) |
|
|
inline |
◆ clear()
void Gecode::Support::BitSetData::clear |
( |
unsigned int | i | ) |
|
|
inline |
◆ next()
unsigned int Gecode::Support::BitSetData::next |
( |
unsigned int | i = 0U | ) |
const |
|
inline |
Return next set bit with position greater or equal to i (there must be a bit)
Definition at line 270 of file bitset-base.hpp.
◆ all() [1/2]
bool Gecode::Support::BitSetData::all |
( |
void | | ) |
const |
|
inline |
◆ all() [2/2]
bool Gecode::Support::BitSetData::all |
( |
unsigned int | i | ) |
const |
|
inline |
Whether all bits from bit 0 to bit i are set.
Definition at line 298 of file bitset-base.hpp.
◆ none() [1/2]
bool Gecode::Support::BitSetData::none |
( |
void | | ) |
const |
|
inline |
◆ none() [2/2]
bool Gecode::Support::BitSetData::none |
( |
unsigned int | i | ) |
const |
|
inline |
Whether no bits from bit 0 to bit i are set.
Definition at line 307 of file bitset-base.hpp.
◆ ones()
unsigned int Gecode::Support::BitSetData::ones |
( |
void | | ) |
const |
|
inline |
◆ zeroes()
unsigned int Gecode::Support::BitSetData::zeroes |
( |
void | | ) |
const |
|
inline |
◆ one()
bool Gecode::Support::BitSetData::one |
( |
void | | ) |
const |
|
inline |
◆ a() [1/3]
void Gecode::Support::BitSetData::a |
( |
BitSetData | a | ) |
|
|
inline |
◆ a() [2/3]
void Gecode::Support::BitSetData::a |
( |
BitSetData | a, |
|
|
unsigned int | i ) |
|
inline |
◆ a() [3/3]
◆ o() [1/3]
void Gecode::Support::BitSetData::o |
( |
BitSetData | a | ) |
|
|
inline |
◆ o() [2/3]
void Gecode::Support::BitSetData::o |
( |
BitSetData | a, |
|
|
unsigned int | i ) |
|
inline |
◆ o() [3/3]
◆ operator==()
bool Gecode::Support::BitSetData::operator== |
( |
BitSetData | a | ) |
const |
|
inline |
◆ operator!=()
bool Gecode::Support::BitSetData::operator!= |
( |
BitSetData | a | ) |
const |
|
inline |
◆ operator~()
BitSetData Gecode::Support::BitSetData::operator~ |
( |
void | | ) |
const |
|
inline |
◆ bits
Base Gecode::Support::BitSetData::bits |
|
protected |
◆ bpb
const unsigned int Gecode::Support::BitSetData::bpb |
|
static |
Initial value:=
static_cast<unsigned int>(CHAR_BIT *
sizeof(
Base))
unsigned long long int Base
Basetype for bits.
Bits per base.
Definition at line 79 of file bitset-base.hpp.
The documentation for this class was generated from the following file: