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

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...
 

Detailed Description

template<unsigned int _size>
class Gecode::Int::Extensional::TinyBitSet< _size >

Tiny bit-set.

Definition at line 232 of file extensional.hh.

Constructor & Destructor Documentation

◆ TinyBitSet() [1/3]

template<unsigned int sz>
Gecode::Int::Extensional::TinyBitSet< sz >::TinyBitSet ( Space home,
unsigned int  n 
)
inline

Initialize sparse bit set for a number of words n.

Set the active bits

Clear unused suffix bits

Definition at line 46 of file tiny-bit-set.hpp.

◆ TinyBitSet() [2/3]

template<unsigned int sz>
template<unsigned int largersz>
Gecode::Int::Extensional::TinyBitSet< sz >::TinyBitSet ( Space home,
const TinyBitSet< largersz > &  tbs 
)
inline

Initialize during cloning.

Definition at line 59 of file tiny-bit-set.hpp.

◆ TinyBitSet() [3/3]

template<unsigned int sz>
template<class IndexType >
Gecode::Int::Extensional::TinyBitSet< sz >::TinyBitSet ( Space home,
const BitSet< IndexType > &  bs 
)
inline

Initialize during cloning.

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

Member Function Documentation

◆ limit()

template<unsigned int _size>
int Gecode::Int::Extensional::TinyBitSet< _size >::limit ( void  ) const

Get the limit.

◆ empty()

template<unsigned int sz>
bool Gecode::Int::Extensional::TinyBitSet< sz >::empty ( void  ) const
inline

Check whether the set is empty.

Definition at line 130 of file tiny-bit-set.hpp.

◆ width()

template<unsigned int sz>
unsigned int Gecode::Int::Extensional::TinyBitSet< sz >::width ( void  ) const
inline

Return the highest active index.

Find the index of the last non-zero word

Definition at line 139 of file tiny-bit-set.hpp.

◆ clear_mask()

template<unsigned int sz>
void Gecode::Int::Extensional::TinyBitSet< sz >::clear_mask ( BitSetData mask)
inline

Clear the first limit words in mask.

Definition at line 83 of file tiny-bit-set.hpp.

◆ add_to_mask()

template<unsigned int sz>
void Gecode::Int::Extensional::TinyBitSet< sz >::add_to_mask ( const BitSetData b,
BitSetData mask 
) const
inline

Add to mask.

Definition at line 92 of file tiny-bit-set.hpp.

◆ intersect_with_mask()

template<unsigned int sz>
template<bool sparse>
void Gecode::Int::Extensional::TinyBitSet< sz >::intersect_with_mask ( const BitSetData mask)
inline

Intersect with mask, sparse mask if sparse is true.

Definition at line 100 of file tiny-bit-set.hpp.

◆ intersect_with_masks()

template<unsigned int sz>
void Gecode::Int::Extensional::TinyBitSet< sz >::intersect_with_masks ( const BitSetData a,
const BitSetData b 
)
inline

Intersect with the "or" of and b.

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

◆ intersects()

template<unsigned int sz>
bool Gecode::Int::Extensional::TinyBitSet< sz >::intersects ( const BitSetData b)
inline

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

Definition at line 121 of file tiny-bit-set.hpp.

◆ nand_with_mask()

template<unsigned int sz>
void Gecode::Int::Extensional::TinyBitSet< sz >::nand_with_mask ( const BitSetData b)
inline

Perform "nand" with b.

Definition at line 114 of file tiny-bit-set.hpp.

◆ nand_with_masks()

template<unsigned int _size>
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.

◆ words()

template<unsigned int sz>
unsigned int Gecode::Int::Extensional::TinyBitSet< sz >::words ( void  ) const
inline

Return the number of required bit set words.

Definition at line 151 of file tiny-bit-set.hpp.

◆ size()

template<unsigned int sz>
unsigned int Gecode::Int::Extensional::TinyBitSet< sz >::size ( void  ) const
inline

Return the total number of words.

Definition at line 157 of file tiny-bit-set.hpp.

Member Data Documentation

◆ bits

template<unsigned int _size>
BitSetData Gecode::Int::Extensional::TinyBitSet< _size >::bits[_size]
protected

Words.

Definition at line 299 of file extensional.hh.


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