38 namespace Gecode {
namespace Int {
namespace Extensional {
40 template<
class IndexType>
43 return static_cast<unsigned int>(_limit);
46 template<
class IndexType>
52 template<
class IndexType>
55 return static_cast<unsigned int>(_limit);
58 template<
class IndexType>
64 template<
class IndexType>
68 IndexType width = _index[0];
69 for (IndexType
i=1;
i<_limit;
i++)
71 assert(static_cast<unsigned int>(width+1U) >= words());
72 return static_cast<unsigned int>(width+1U);
75 template<
class IndexType>
78 : _limit(static_cast<IndexType>(n)),
79 _index(home.alloc<IndexType>(n)),
88 template<
class IndexType>
89 template<
class OldIndexType>
103 template<
class IndexType>
110 template<
class IndexType>
115 template<
class IndexType>
120 template<
class IndexType>
125 template<
class IndexType>
131 template<
class IndexType>
139 assert(
_bits[i].none());
147 template<
class IndexType>
153 assert(mask[
i].none());
157 template<
class IndexType>
165 template<
class IndexType>
166 template<
bool sparse>
189 template<
class IndexType>
205 template<
class IndexType>
217 template<
class IndexType>
226 template<
class IndexType>
229 unsigned long long int o = 0U;
231 o += static_cast<unsigned long long int>
236 template<
class IndexType>
239 unsigned long long int o = 0U;
241 o += static_cast<unsigned long long int>(
_bits[
i].
ones());
245 template<
class IndexType>
248 return (static_cast<unsigned long long int>(
_limit) *
const FloatNum max
Largest allowed float value.
bool empty(void) const
Check whether the set is empty.
void nand_with_mask(const BitSetData *b)
Perform "nand" with b.
void intersect_with_masks(const BitSetData *a, const BitSetData *b)
Intersect with the "or" of and b.
void flush(void)
Make the set empty.
unsigned int width(void) const
Return the highest active index.
int n
Number of negative literals for node type.
Gecode::IntArgs i({1, 2, 3, 4})
struct Gecode::@593::NNF::@62::@63 b
For binary nodes (and, or, eqv)
unsigned long long int bits(void) const
Return an upper bound on the number of bits.
void add_to_mask(const BitSetData *b, BitSetData *mask) const
Add to mask.
void o(BitSetData a)
Perform "or" with a.
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.
bool intersects(const BitSetData *b) const
Check if has a non-empty intersection with the set.
unsigned int limit(void) const
Get the limit.
void a(BitSetData a)
Perform "and" with a.
unsigned long long int ones(void) const
Return the number of ones.
void intersect_with_mask(const BitSetData *mask)
Intersect with mask, sparse mask if sparse is true.
void replace_and_decrease(IndexType i, BitSetData w)
Replace the i th word with w, decrease limit if w is zero.
Gecode toplevel namespace
void clear_mask(BitSetData *mask) const
Clear the first limit words in mask.
unsigned int size(void) const
Return the number of required bit set words.
static const unsigned int bpb
Bits per base.
bool none(void) const
Whether no bits are set.
#define GECODE_NEVER
Assert that this command is never executed.
struct Gecode::@593::NNF::@62::@64 a
For atomic nodes.