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>
62 for (
unsigned int i=0U; i<sz; i++)
67 template<
unsigned int sz>
68 template<
class IndexType>
71 assert(sz == sbs.
width());
73 for (
unsigned int i=0U; i<sz; i++)
75 for (
unsigned int i=0U; i<sbs.
words(); i++)
80 template<
unsigned int sz>
83 for (
unsigned int i=0U; i<sz; i++) {
85 assert(mask[i].none());
89 template<
unsigned int sz>
92 for (
unsigned int i=0U; i<sz; i++)
96 template<
unsigned int sz>
100 for (
unsigned int i=0U; i<sz; i++)
104 template<
unsigned int sz>
108 for (
unsigned int i=0U; i<sz; i++)
112 template<
unsigned int sz>
115 for (
unsigned int i=0U; i<sz; i++)
119 template<
unsigned int sz>
122 for (
unsigned int i=0U; i<sz; i++)
123 _bits[i].init(
false);
127 template<
unsigned int sz>
130 for (
unsigned int i=0U; i<sz; i++)
136 template<
unsigned int sz>
139 unsigned long long int o = 0U;
140 for (
unsigned int i=0U; i<sz; i++)
141 o +=
static_cast<unsigned long long int>
146 template<
unsigned int sz>
149 unsigned long long int o = 0U;
150 for (
unsigned int i=0U; i<sz; i++)
151 o +=
static_cast<unsigned long long int>(
_bits[i].
ones());
155 template<
unsigned int sz>
158 return (
static_cast<unsigned long long int>(sz) *
162 template<
unsigned int sz>
165 for (
unsigned int i=0U; i<sz; i++)
166 if (!
_bits[i].none())
171 template<
unsigned int sz>
176 for (
unsigned int i=sz; i--; )
177 if (!
_bits[i].none())
183 template<
unsigned int sz>
189 template<
unsigned int sz>
unsigned int width(void) const
Return the highest active index.
IndexType * _index
Indices.
bool empty(void) const
Check whether the set is empty.
unsigned int words(void) const
Return the number of required bit set words.
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.
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.