Tiny bit-set. More...
#include <extensional.hh>
Public Member Functions | |
TinyBitSet (Space &home, unsigned int n) | |
Initialize sparse bit set for a number of words n. More... | |
template<unsigned int largersize> | |
TinyBitSet (Space &home, const TinyBitSet< largersize > &tbs) | |
Initialize during cloning. More... | |
template<class IndexType > | |
TinyBitSet (Space &home, const BitSet< IndexType > &bs) | |
Initialize during cloning. More... | |
int | limit (void) const |
Get the limit. More... | |
bool | empty (void) const |
Check whether the set is empty. More... | |
unsigned int | width (void) const |
Return the highest active index. More... | |
void | clear_mask (BitSetData *mask) |
Clear the first limit words in mask. More... | |
void | add_to_mask (const BitSetData *b, BitSetData *mask) const |
Add to mask. More... | |
template<bool sparse> | |
void | intersect_with_mask (const BitSetData *mask) |
Intersect with mask, sparse mask if sparse is true. More... | |
void | intersect_with_masks (const BitSetData *a, const BitSetData *b) |
Intersect with the "or" of and b. More... | |
bool | intersects (const BitSetData *b) |
Check if has a non-empty intersection with the set. More... | |
void | nand_with_mask (const BitSetData *b) |
Perform "nand" with b. More... | |
void | nand_with_masks (const BitSetData *a, const BitSetData *b) |
Perform "nand" with and the "or" of a and b. More... | |
unsigned int | words (void) const |
Return the number of required bit set words. More... | |
unsigned int | size (void) const |
Return the total number of words. More... | |
Protected Attributes | |
BitSetData | bits [_size] |
Words. More... | |
Tiny bit-set.
Definition at line 236 of file extensional.hh.
|
inline |
Initialize sparse bit set for a number of words n.
Set the active bits
Clear unused suffix bits
Definition at line 50 of file tiny-bit-set.hpp.
|
inline |
Initialize during cloning.
Definition at line 63 of file tiny-bit-set.hpp.
|
inline |
Initialize during cloning.
Definition at line 74 of file tiny-bit-set.hpp.
int Gecode::Int::Extensional::TinyBitSet< _size >::limit | ( | void | ) | const |
Get the limit.
|
inline |
Check whether the set is empty.
Definition at line 134 of file tiny-bit-set.hpp.
|
inline |
Return the highest active index.
Find the index of the last non-zero word
Definition at line 143 of file tiny-bit-set.hpp.
|
inline |
Clear the first limit words in mask.
Definition at line 87 of file tiny-bit-set.hpp.
|
inline |
Add to mask.
Definition at line 96 of file tiny-bit-set.hpp.
|
inline |
Intersect with mask, sparse mask if sparse is true.
Definition at line 104 of file tiny-bit-set.hpp.
|
inline |
Intersect with the "or" of and b.
Definition at line 111 of file tiny-bit-set.hpp.
|
inline |
Check if has a non-empty intersection with the set.
Definition at line 125 of file tiny-bit-set.hpp.
|
inline |
Perform "nand" with b.
Definition at line 118 of file tiny-bit-set.hpp.
void Gecode::Int::Extensional::TinyBitSet< _size >::nand_with_masks | ( | const BitSetData * | a, |
const BitSetData * | b | ||
) |
Perform "nand" with and the "or" of a and b.
|
inline |
Return the number of required bit set words.
Definition at line 155 of file tiny-bit-set.hpp.
|
inline |
Return the total number of words.
Definition at line 161 of file tiny-bit-set.hpp.
|
protected |
Words.
Definition at line 303 of file extensional.hh.