Generated on Sat Feb 7 2015 02:01:52 for Gecode by doxygen 1.8.9.1
Gecode::Support::RawBitSetBase Class Reference

Basic bitset support (without stored size information) More...

#include <bitset-base.hpp>

Public Member Functions

 RawBitSetBase (void)
 Default constructor (yields empty set) More...
 
template<class A >
 RawBitSetBase (A &a, unsigned int sz, bool setbits=false)
 Initialize for sz bits and allocator a. More...
 
template<class A >
 RawBitSetBase (A &a, unsigned int sz, const RawBitSetBase &bs)
 Copy from bitset bs with allocator a. More...
 
template<class A >
void allocate (A &a, unsigned int sz)
 Allocate for sz bits and allocator a (only after default constructor) More...
 
template<class A >
void init (A &a, unsigned int sz, bool setbits=false)
 Initialize for sz bits and allocator a (only after default constructor) More...
 
void clearall (unsigned int sz, bool setbits=false)
 Clear sz bits. More...
 
void copy (unsigned int sz, const RawBitSetBase &bs)
 Copy sz bits from bs. More...
 
bool get (unsigned int i) const
 Access value at bit i. More...
 
void set (unsigned int i)
 Set bit i. More...
 
void clear (unsigned int i)
 Clear bit i. More...
 
unsigned int next (unsigned int i) const
 Return position greater or equal i of next set bit (i is allowed to be equal to size) More...
 
BitSetStatus status (unsigned int sz) const
 Return status of bitset. More...
 
bool all (unsigned int sz) const
 Test whether all bits are set. More...
 
bool none (unsigned int sz) const
 Test whether no bits are set. More...
 
template<class A >
void resize (A &a, unsigned int sz, unsigned int n, bool setbits=false)
 Resize bitset from sz to n elememts. More...
 
template<class A >
void dispose (A &a, unsigned int sz)
 Dispose memory for bit set. More...
 

Protected Attributes

BitSetDatadata
 Stored bits. More...
 

Static Protected Attributes

static const unsigned int bpb = BitSetData::bpb
 Bits per base. More...
 

Detailed Description

Basic bitset support (without stored size information)

Definition at line 125 of file bitset-base.hpp.

Constructor & Destructor Documentation

Gecode::Support::RawBitSetBase::RawBitSetBase ( void  )
inline

Default constructor (yields empty set)

Definition at line 377 of file bitset-base.hpp.

template<class A >
Gecode::Support::RawBitSetBase::RawBitSetBase ( A &  a,
unsigned int  sz,
bool  setbits = false 
)
inline

Initialize for sz bits and allocator a.

Definition at line 382 of file bitset-base.hpp.

template<class A >
Gecode::Support::RawBitSetBase::RawBitSetBase ( A &  a,
unsigned int  sz,
const RawBitSetBase bs 
)
inline

Copy from bitset bs with allocator a.

Definition at line 392 of file bitset-base.hpp.

Member Function Documentation

template<class A >
void Gecode::Support::RawBitSetBase::allocate ( A &  a,
unsigned int  sz 
)
inline

Allocate for sz bits and allocator a (only after default constructor)

Definition at line 402 of file bitset-base.hpp.

template<class A >
void Gecode::Support::RawBitSetBase::init ( A &  a,
unsigned int  sz,
bool  setbits = false 
)
inline

Initialize for sz bits and allocator a (only after default constructor)

Definition at line 409 of file bitset-base.hpp.

void Gecode::Support::RawBitSetBase::clearall ( unsigned int  sz,
bool  setbits = false 
)
inline

Clear sz bits.

Definition at line 425 of file bitset-base.hpp.

void Gecode::Support::RawBitSetBase::copy ( unsigned int  sz,
const RawBitSetBase bs 
)
inline

Copy sz bits from bs.

Definition at line 419 of file bitset-base.hpp.

bool Gecode::Support::RawBitSetBase::get ( unsigned int  i) const
inline

Access value at bit i.

Definition at line 339 of file bitset-base.hpp.

void Gecode::Support::RawBitSetBase::set ( unsigned int  i)
inline

Set bit i.

Definition at line 343 of file bitset-base.hpp.

void Gecode::Support::RawBitSetBase::clear ( unsigned int  i)
inline

Clear bit i.

Definition at line 347 of file bitset-base.hpp.

unsigned int Gecode::Support::RawBitSetBase::next ( unsigned int  i) const
inline

Return position greater or equal i of next set bit (i is allowed to be equal to size)

Definition at line 431 of file bitset-base.hpp.

BitSetStatus Gecode::Support::RawBitSetBase::status ( unsigned int  sz) const
inline

Return status of bitset.

Definition at line 444 of file bitset-base.hpp.

bool Gecode::Support::RawBitSetBase::all ( unsigned int  sz) const
inline

Test whether all bits are set.

Definition at line 470 of file bitset-base.hpp.

bool Gecode::Support::RawBitSetBase::none ( unsigned int  sz) const
inline

Test whether no bits are set.

Definition at line 475 of file bitset-base.hpp.

template<class A >
void Gecode::Support::RawBitSetBase::resize ( A &  a,
unsigned int  sz,
unsigned int  n,
bool  setbits = false 
)

Resize bitset from sz to n elememts.

Definition at line 353 of file bitset-base.hpp.

template<class A >
void Gecode::Support::RawBitSetBase::dispose ( A &  a,
unsigned int  sz 
)
inline

Dispose memory for bit set.

Definition at line 372 of file bitset-base.hpp.

Member Data Documentation

const unsigned int Gecode::Support::RawBitSetBase::bpb = BitSetData::bpb
staticprotected

Bits per base.

Definition at line 128 of file bitset-base.hpp.

BitSetData* Gecode::Support::RawBitSetBase::data
protected

Stored bits.

Definition at line 130 of file bitset-base.hpp.


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