Generated on Sat Jun 2 2018 07:17:44 for Gecode by doxygen 1.8.13
Gecode::Int::Extensional::BitSet< IndexType > Class Template Reference

Bit-set. More...

#include <extensional.hh>

Public Member Functions

 BitSet (Space &home, unsigned int n)
 Initialize bit set for a number of words n. More...
 
template<class OldIndexType >
 BitSet (Space &home, const BitSet< OldIndexType > &bs)
 Initialize during cloning. More...
 
 BitSet (Space &home, const TinyBitSet< 1U > &tbs)
 Initialize during cloning (unused) More...
 
 BitSet (Space &home, const TinyBitSet< 2U > &tbs)
 Initialize during cloning (unused) More...
 
 BitSet (Space &home, const TinyBitSet< 3U > &tbs)
 Initialize during cloning (unused) More...
 
 BitSet (Space &home, const TinyBitSet< 4U > &tbs)
 Initialize during cloning (unused) More...
 
unsigned 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) const
 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) const
 Check if has a non-empty intersection with the set. More...
 
void nand_with_mask (const BitSetData *b)
 Perform "nand" with b. More...
 
unsigned int words (void) const
 Return the number of required bit set words. More...
 
unsigned int size (void) const
 Return the number of required bit set words. More...
 

Protected Member Functions

void replace_and_decrease (IndexType i, BitSetData w)
 Replace the i th word with w, decrease limit if w is zero. More...
 

Protected Attributes

IndexType _limit
 Limit. More...
 
IndexType * index
 Indices. More...
 
BitSetDatabits
 Words. More...
 

Detailed Description

template<class IndexType>
class Gecode::Int::Extensional::BitSet< IndexType >

Bit-set.

Definition at line 236 of file extensional.hh.

Constructor & Destructor Documentation

◆ BitSet() [1/6]

template<class IndexType >
Gecode::Int::Extensional::BitSet< IndexType >::BitSet ( Space home,
unsigned int  n 
)
inline

Initialize bit set for a number of words n.

Definition at line 42 of file bit-set.hpp.

◆ BitSet() [2/6]

template<class IndexType >
template<class OldIndexType >
Gecode::Int::Extensional::BitSet< IndexType >::BitSet ( Space home,
const BitSet< OldIndexType > &  bs 
)
inline

Initialize during cloning.

Definition at line 56 of file bit-set.hpp.

◆ BitSet() [3/6]

template<class IndexType >
Gecode::Int::Extensional::BitSet< IndexType >::BitSet ( Space home,
const TinyBitSet< 1U > &  tbs 
)
inline

Initialize during cloning (unused)

Definition at line 70 of file bit-set.hpp.

◆ BitSet() [4/6]

template<class IndexType >
Gecode::Int::Extensional::BitSet< IndexType >::BitSet ( Space home,
const TinyBitSet< 2U > &  tbs 
)
inline

Initialize during cloning (unused)

Definition at line 75 of file bit-set.hpp.

◆ BitSet() [5/6]

template<class IndexType >
Gecode::Int::Extensional::BitSet< IndexType >::BitSet ( Space home,
const TinyBitSet< 3U > &  tbs 
)
inline

Initialize during cloning (unused)

Definition at line 80 of file bit-set.hpp.

◆ BitSet() [6/6]

template<class IndexType >
Gecode::Int::Extensional::BitSet< IndexType >::BitSet ( Space home,
const TinyBitSet< 4U > &  tbs 
)
inline

Initialize during cloning (unused)

Definition at line 85 of file bit-set.hpp.

Member Function Documentation

◆ replace_and_decrease()

template<class IndexType >
void Gecode::Int::Extensional::BitSet< IndexType >::replace_and_decrease ( IndexType  i,
BitSetData  w 
)
inlineprotected

Replace the i th word with w, decrease limit if w is zero.

Definition at line 91 of file bit-set.hpp.

◆ limit()

template<class IndexType >
unsigned int Gecode::Int::Extensional::BitSet< IndexType >::limit ( void  ) const
inline

Get the limit.

Definition at line 187 of file bit-set.hpp.

◆ empty()

template<class IndexType >
bool Gecode::Int::Extensional::BitSet< IndexType >::empty ( void  ) const
inline

Check whether the set is empty.

Definition at line 193 of file bit-set.hpp.

◆ width()

template<class IndexType >
unsigned int Gecode::Int::Extensional::BitSet< IndexType >::width ( void  ) const
inline

Return the highest active index.

Definition at line 211 of file bit-set.hpp.

◆ clear_mask()

template<class IndexType >
void Gecode::Int::Extensional::BitSet< IndexType >::clear_mask ( BitSetData mask) const
inline

Clear the first limit words in mask.

Definition at line 107 of file bit-set.hpp.

◆ add_to_mask()

template<class IndexType >
void Gecode::Int::Extensional::BitSet< IndexType >::add_to_mask ( const BitSetData b,
BitSetData mask 
) const
inline

Add to mask.

Definition at line 117 of file bit-set.hpp.

◆ intersect_with_mask()

template<class IndexType >
template<bool sparse>
void Gecode::Int::Extensional::BitSet< IndexType >::intersect_with_mask ( const BitSetData mask)
inline

Intersect with mask, sparse mask if sparse is true.

Definition at line 126 of file bit-set.hpp.

◆ intersect_with_masks()

template<class IndexType >
void Gecode::Int::Extensional::BitSet< IndexType >::intersect_with_masks ( const BitSetData a,
const BitSetData b 
)
inline

Intersect with the "or" of and b.

Definition at line 149 of file bit-set.hpp.

◆ intersects()

template<class IndexType >
bool Gecode::Int::Extensional::BitSet< IndexType >::intersects ( const BitSetData b) const
inline

Check if has a non-empty intersection with the set.

Definition at line 177 of file bit-set.hpp.

◆ nand_with_mask()

template<class IndexType >
void Gecode::Int::Extensional::BitSet< IndexType >::nand_with_mask ( const BitSetData b)
inline

Perform "nand" with b.

Definition at line 165 of file bit-set.hpp.

◆ words()

template<class IndexType >
unsigned int Gecode::Int::Extensional::BitSet< IndexType >::words ( void  ) const
inline

Return the number of required bit set words.

Definition at line 199 of file bit-set.hpp.

◆ size()

template<class IndexType >
unsigned int Gecode::Int::Extensional::BitSet< IndexType >::size ( void  ) const
inline

Return the number of required bit set words.

Definition at line 205 of file bit-set.hpp.

Member Data Documentation

◆ _limit

template<class IndexType>
IndexType Gecode::Int::Extensional::BitSet< IndexType >::_limit
protected

Limit.

Definition at line 241 of file extensional.hh.

◆ index

template<class IndexType>
IndexType* Gecode::Int::Extensional::BitSet< IndexType >::index
protected

Indices.

Definition at line 243 of file extensional.hh.

◆ bits

template<class IndexType>
BitSetData* Gecode::Int::Extensional::BitSet< IndexType >::bits
protected

Words.

Definition at line 245 of file extensional.hh.


The documentation for this class was generated from the following files: