Generated on Mon May 10 06:47:02 2010 for Gecode by doxygen 1.6.3

Gecode::Support::BitSetBase Class Reference

Basic bitset support. More...

#include <bitset-base.hpp>

List of all members.

Public Member Functions

 BitSetBase (void)
 Default constructor (yields empty set).
template<class A >
 BitSetBase (A &a, unsigned int s, bool set=false)
 Initialize for s bits and allocator a.
template<class A >
 BitSetBase (A &a, const BitSetBase &bs)
 Copy from bitset bs with allocator a.
template<class A >
void init (A &a, unsigned int s, bool set=false)
 Initialize for s bits and allocator a (only after default constructor).
unsigned int size (void) const
 Return size of bitset (number of bits).
bool get (unsigned int i) const
 Access value at bit i.
void set (unsigned int i)
 Set bit i.
void clear (unsigned int i)
 Clear bit i.
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).
BitSetStatus status (void) const
 Return status of bitset.
template<class A >
void dispose (A &a)
 Dispose memory for bit set.

Protected Member Functions

bool _get (unsigned int i) const
 Access value at bit i (no index check).
void _set (unsigned int i)
 Set bit i (no index check).

Protected Attributes

unsigned int sz
 Size of bitset (number of bits).
BitSetDatadata
 Stored bits.

Static Protected Attributes

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

Detailed Description

Basic bitset support.

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


Constructor & Destructor Documentation

Gecode::Support::BitSetBase::BitSetBase ( void   )  [inline]

Default constructor (yields empty set).

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

template<class A >
Gecode::Support::BitSetBase::BitSetBase ( A &  a,
unsigned int  s,
bool  set = false 
) [inline]

Initialize for s bits and allocator a.

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

template<class A >
Gecode::Support::BitSetBase::BitSetBase ( A &  a,
const BitSetBase bs 
) [inline]

Copy from bitset bs with allocator a.

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


Member Function Documentation

bool Gecode::Support::BitSetBase::_get ( unsigned int  i  )  const [inline, protected]

Access value at bit i (no index check).

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

void Gecode::Support::BitSetBase::_set ( unsigned int  i  )  [inline, protected]

Set bit i (no index check).

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

template<class A >
void Gecode::Support::BitSetBase::init ( A &  a,
unsigned int  s,
bool  set = false 
) [inline]

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

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

unsigned int Gecode::Support::BitSetBase::size ( void   )  const [inline]

Return size of bitset (number of bits).

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

bool Gecode::Support::BitSetBase::get ( unsigned int  i  )  const [inline]

Access value at bit i.

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

void Gecode::Support::BitSetBase::set ( unsigned int  i  )  [inline]

Set bit i.

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

void Gecode::Support::BitSetBase::clear ( unsigned int  i  )  [inline]

Clear bit i.

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

unsigned int Gecode::Support::BitSetBase::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 308 of file bitset-base.hpp.

BitSetStatus Gecode::Support::BitSetBase::status ( void   )  const [inline]

Return status of bitset.

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

template<class A >
void Gecode::Support::BitSetBase::dispose ( A &  a  )  [inline]

Dispose memory for bit set.

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


Member Data Documentation

const unsigned int Gecode::Support::BitSetBase::bpb = BitSetData::bpb [static, protected]

Bits per base.

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

unsigned int Gecode::Support::BitSetBase::sz [protected]

Size of bitset (number of bits).

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

Stored bits.

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


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