
Bit-set. More...
#include <gecode/int/extensional.hh>
Public Member Functions | |
| BitSet (Space &home, unsigned int n, bool indexed=false) | |
| Initialize bit set for a number of words n. | |
| template<class OldIndexType> | |
| BitSet (Space &home, const BitSet< OldIndexType > &bs) | |
| Initialize during cloning. | |
| BitSet (Space &home, const TinyBitSet< 1U > &tbs) | |
| Initialize during cloning (unused). | |
| BitSet (Space &home, const TinyBitSet< 2U > &tbs) | |
| Initialize during cloning (unused). | |
| BitSet (Space &home, const TinyBitSet< 3U > &tbs) | |
| Initialize during cloning (unused). | |
| BitSet (Space &home, const TinyBitSet< 4U > &tbs) | |
| Initialize during cloning (unused). | |
| unsigned int | limit (void) const |
| Get the number of active words. | |
| bool | empty (void) const |
| Check whether the set is empty. | |
| void | flush (void) |
| Make the set empty. | |
| unsigned int | width (void) const |
| Return the highest active index. | |
| void | clear_mask (BitSetData *mask) const |
| Clear all active words in mask. | |
| void | add_to_mask (const BitSetData *support, BitSetData *mask) const |
| Add support to mask. | |
| void | add_to_mask (const CompressedSupport &support, BitSetData *mask) const |
| Add compressed support list to mask. | |
| template<bool sparse> | |
| void | intersect_with_mask (const BitSetData *mask) |
| Intersect with mask, sparse mask if sparse is true. | |
| void | intersect_with_mask (const CompressedSupport &support) |
| Intersect with compressed support list. | |
| void | intersect_with_masks (const BitSetData *a, const BitSetData *b) |
| Intersect with the "or" of a and b. | |
| void | intersect_with_masks (const CompressedSupport &a, const CompressedSupport &b) |
| Intersect with the "or" of two compressed support lists. | |
| bool | intersects (const BitSetData *mask) const |
| Check if has a non-empty intersection with the set. | |
| bool | intersects (const CompressedSupport &support) const |
| Check if compressed support list intersects with the set. | |
| void | nand_with_mask (const BitSetData *mask) |
| Perform "nand" with mask. | |
| void | nand_with_mask (const CompressedSupport &support) |
| Perform "nand" with compressed support list. | |
| unsigned long long int | ones (void) const |
| Return the number of ones. | |
| unsigned long long int | ones (const BitSetData *mask) const |
| Return the number of ones after intersection with mask. | |
| unsigned long long int | ones (const CompressedSupport &support) const |
| Return the number of ones after intersection with compressed support list. | |
| unsigned long long int | bits (void) const |
| Return an upper bound on the number of bits. | |
| unsigned int | words (void) const |
| Return the number of required bit set words. | |
| unsigned int | size (void) const |
| Return the number of required bit set words. | |
Protected Member Functions | |
| void | replace_and_decrease (IndexType active_pos, BitSetData word) |
| Replace active word active_pos, dropping it if word is zero. | |
Protected Attributes | |
| IndexType | _active_words |
| Number of active words. | |
| IndexType | _word_capacity |
| Number of addressable word slots. | |
| IndexType * | _word_index |
| Original word index for each active word position. | |
| BitSetData * | _word_bits |
| Active word data. | |
| IndexType * | _active_position |
| Reverse map from word index to active position+1 (optional). | |
Bit-set.
Definition at line 256 of file extensional.hh.
|
inline |
Initialize bit set for a number of words n.
Definition at line 118 of file bit-set.hpp.
|
inline |
Initialize during cloning.
Definition at line 137 of file bit-set.hpp.
|
inline |
Initialize during cloning (unused).
Definition at line 170 of file bit-set.hpp.
|
inline |
Initialize during cloning (unused).
Definition at line 176 of file bit-set.hpp.
|
inline |
Initialize during cloning (unused).
Definition at line 182 of file bit-set.hpp.
|
inline |
Initialize during cloning (unused).
Definition at line 188 of file bit-set.hpp.
|
inlineprotected |
Replace active word active_pos, dropping it if word is zero.
Definition at line 195 of file bit-set.hpp.
|
inline |
Get the number of active words.
Definition at line 83 of file bit-set.hpp.
|
inline |
Check whether the set is empty.
Definition at line 89 of file bit-set.hpp.
|
inline |
Make the set empty.
Definition at line 163 of file bit-set.hpp.
|
inline |
Return the highest active index.
Definition at line 107 of file bit-set.hpp.
|
inline |
Clear all active words in mask.
Definition at line 219 of file bit-set.hpp.
|
inline |
Add support to mask.
Definition at line 229 of file bit-set.hpp.
|
inline |
Add compressed support list to mask.
Definition at line 238 of file bit-set.hpp.
|
inline |
Intersect with mask, sparse mask if sparse is true.
Definition at line 265 of file bit-set.hpp.
|
inline |
Intersect with compressed support list.
Definition at line 288 of file bit-set.hpp.
|
inline |
Intersect with the "or" of a and b.
Definition at line 308 of file bit-set.hpp.
|
inline |
Intersect with the "or" of two compressed support lists.
Definition at line 324 of file bit-set.hpp.
|
inline |
Check if has a non-empty intersection with the set.
Definition at line 394 of file bit-set.hpp.
|
inline |
Check if compressed support list intersects with the set.
Definition at line 403 of file bit-set.hpp.
|
inline |
Perform "nand" with mask.
Definition at line 350 of file bit-set.hpp.
|
inline |
Perform "nand" with compressed support list.
Definition at line 363 of file bit-set.hpp.
|
inline |
Return the number of ones.
Definition at line 469 of file bit-set.hpp.
|
inline |
Return the number of ones after intersection with mask.
Definition at line 430 of file bit-set.hpp.
|
inline |
Return the number of ones after intersection with compressed support list.
Definition at line 440 of file bit-set.hpp.
|
inline |
Return an upper bound on the number of bits.
Definition at line 478 of file bit-set.hpp.
|
inline |
Return the number of required bit set words.
Definition at line 95 of file bit-set.hpp.
|
inline |
Return the number of required bit set words.
Definition at line 101 of file bit-set.hpp.
|
protected |
Number of active words.
Definition at line 261 of file extensional.hh.
|
protected |
Number of addressable word slots.
Definition at line 263 of file extensional.hh.
|
protected |
Original word index for each active word position.
Definition at line 265 of file extensional.hh.
|
protected |
Active word data.
Definition at line 267 of file extensional.hh.
|
protected |
Reverse map from word index to active position+1 (optional).
Definition at line 269 of file extensional.hh.