38 namespace Gecode {
namespace Int {
namespace Extensional {
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>
void intersect_with_masks(const BitSetData *a, const BitSetData *b)
Intersect with the "or" of and b.
#define GECODE_ASSUME(p)
Assert certain property.
bool empty(void) const
Check whether the set is empty.
void intersect_with_mask(const BitSetData *mask)
Intersect with mask, sparse mask if sparse is true.
void add_to_mask(const BitSetData *b, BitSetData *mask) const
Add to mask.
unsigned int width(void) const
Return the highest active index.
int n
Number of negative literals for node type.
void flush(void)
Make the set empty.
Gecode::IntArgs i({1, 2, 3, 4})
bool empty(void) const
Check whether the set is empty.
struct Gecode::@593::NNF::@62::@63 b
For binary nodes (and, or, eqv)
void o(BitSetData a)
Perform "or" with a.
unsigned long long int bits(void) const
Return an upper bound on the number of bits.
unsigned int size(void) const
Return the total number of words.
IndexType * _index
Indices.
unsigned int words(void) const
Return the number of required bit set words.
void init(bool setbits=false)
Initialize with all bits set if setbits.
void clear_mask(BitSetData *mask)
Clear the first limit words in mask.
void nand_with_mask(const BitSetData *b)
Perform "nand" with b.
unsigned int width(void) const
Return the highest active index.
unsigned int words(void) const
Return the number of required bit set words.
unsigned long long int ones(void) const
Return the number of ones.
void a(BitSetData a)
Perform "and" with a.
bool intersects(const BitSetData *b)
Check if has a non-empty intersection with the set.
BitSetData _bits[_size]
Words.
Gecode toplevel namespace
static const unsigned int bpb
Bits per base.
#define GECODE_NEVER
Assert that this command is never executed.
struct Gecode::@593::NNF::@62::@64 a
For atomic nodes.