44 template<
unsigned int sz>
49 for (
unsigned int i=0U; i<n; i++)
52 for (
unsigned int i=n; i<sz; i++)
56 template<
unsigned int sz>
57 template<
unsigned int largersz>
61 for (
unsigned int i=0U; i<sz; i++)
66 template<
unsigned int sz>
67 template<
class IndexType>
70 assert(sz == sbs.
width());
72 for (
unsigned int i=0U; i<sz; i++)
74 for (
unsigned int i=0U; i<sbs.
words(); i++)
79 template<
unsigned int sz>
82 for (
unsigned int i=0U; i<sz; i++) {
84 assert(mask[i].none());
88 template<
unsigned int sz>
91 for (
unsigned int i=0U; i<sz; i++)
95 template<
unsigned int sz>
99 for (
unsigned int i=0U; i<sz; i++) {
106 template<
unsigned int sz>
107 template<
bool sparse>
110 for (
unsigned int i=0U; i<sz; i++)
114 template<
unsigned int sz>
117 for (
unsigned int i=0U; i<sz; i++) {
120 _bits[i].init(
false);
126 template<
unsigned int sz>
130 for (
unsigned int i=0U; i<sz; i++)
134 template<
unsigned int sz>
137 for (
unsigned int i=0U; i<sz; i++) {
152 template<
unsigned int sz>
155 for (
unsigned int i=0U; i<sz; i++)
159 template<
unsigned int sz>
162 for (
unsigned int i=0U; i<sz; i++) {
169 template<
unsigned int sz>
172 for (
unsigned int i=0U; i<sz; i++)
173 _bits[i].init(
false);
177 template<
unsigned int sz>
180 for (
unsigned int i=0U; i<sz; i++)
186 template<
unsigned int sz>
189 for (
unsigned int i=0U; i<sz; i++) {
197 template<
unsigned int sz>
198 forceinline
unsigned long long int
200 unsigned long long int o = 0U;
201 for (
unsigned int i=0U; i<sz; i++)
202 o +=
static_cast<unsigned long long int>
207 template<
unsigned int sz>
208 forceinline
unsigned long long int
210 unsigned long long int o = 0U;
211 for (
unsigned int i=0U; i<sz; i++) {
214 o +=
static_cast<unsigned long long int>
220 template<
unsigned int sz>
221 forceinline
unsigned long long int
223 unsigned long long int o = 0U;
224 for (
unsigned int i=0U; i<sz; i++)
225 o +=
static_cast<unsigned long long int>(
_bits[i].
ones());
229 template<
unsigned int sz>
230 forceinline
unsigned long long int
232 return (
static_cast<unsigned long long int>(sz) *
236 template<
unsigned int sz>
239 for (
unsigned int i=0U; i<sz; i++)
240 if (!
_bits[i].none())
245 template<
unsigned int sz>
246 forceinline
unsigned int
250 for (
unsigned int i=sz; i--; )
251 if (!
_bits[i].none())
257 template<
unsigned int sz>
258 forceinline
unsigned int
263 template<
unsigned int sz>
264 forceinline
unsigned int
BitSetData * _word_bits
Active word data.
unsigned int width(void) const
Return the highest active index.
IndexType * _word_index
Original word index for each active word position.
bool empty(void) const
Check whether the set is empty.
unsigned int words(void) const
Return the number of required bit set words.
Compressed tuple-word support list.
void intersect_with_mask(const BitSetData *mask)
Intersect with mask, sparse mask if sparse is true.
unsigned int words(void) const
Return the number of required bit set words.
unsigned int width(void) const
Return the highest active index.
bool intersects(const BitSetData *b)
Check if has a non-empty intersection with the set.
void add_to_mask(const BitSetData *b, BitSetData *mask) const
Add to mask.
unsigned long long int bits(void) const
Return an upper bound on the number of bits.
unsigned long long int ones(void) const
Return the number of ones.
unsigned int size(void) const
Return the total number of words.
bool empty(void) const
Check whether the set is empty.
BitSetData _bits[_size]
Words.
void intersect_with_masks(const BitSetData *a, const BitSetData *b)
Intersect with the "or" of and b.
void flush(void)
Make the set empty.
void nand_with_mask(const BitSetData *b)
Perform "nand" with b.
void clear_mask(BitSetData *mask)
Clear the first limit words in mask.
static const unsigned int bpb
Bits per base.
void init(bool setbits=false)
Initialize with all bits set if setbits.
void a(BitSetData a)
Perform "and" with a.
void o(BitSetData a)
Perform "or" with a.
const TupleSet::BitSetData * find_support_word(const CompressedSupport &s, unsigned int widx)
Gecode::Support::BitSetData BitSetData
Import type.
Gecode toplevel namespace
#define GECODE_NEVER
Assert that this command is never executed.
#define GECODE_ASSUME(p)
Assert certain property.